equal
deleted
inserted
replaced
396 caching(self, req) # sets ETag header or raises NOT_MODIFIED |
396 caching(self, req) # sets ETag header or raises NOT_MODIFIED |
397 if cmd not in webcommands.__all__: |
397 if cmd not in webcommands.__all__: |
398 msg = 'no such method: %s' % cmd |
398 msg = 'no such method: %s' % cmd |
399 raise ErrorResponse(HTTP_BAD_REQUEST, msg) |
399 raise ErrorResponse(HTTP_BAD_REQUEST, msg) |
400 elif cmd == 'file' and 'raw' in req.form.get('style', []): |
400 elif cmd == 'file' and 'raw' in req.form.get('style', []): |
401 self.ctype = ctype |
401 # TODO convert to regular assignment once app proxy is removed. |
|
402 object.__setattr__(rctx, 'ctype', ctype) |
402 content = webcommands.rawfile(rctx, req, tmpl) |
403 content = webcommands.rawfile(rctx, req, tmpl) |
403 else: |
404 else: |
404 content = getattr(webcommands, cmd)(rctx, req, tmpl) |
405 content = getattr(webcommands, cmd)(rctx, req, tmpl) |
405 req.respond(HTTP_OK, ctype) |
406 req.respond(HTTP_OK, ctype) |
406 |
407 |