equal
deleted
inserted
replaced
434 req.form['cmd'] = [tmpl.cache['default']] |
434 req.form['cmd'] = [tmpl.cache['default']] |
435 cmd = req.form['cmd'][0] |
435 cmd = req.form['cmd'][0] |
436 |
436 |
437 # Don't enable caching if using a CSP nonce because then it wouldn't |
437 # Don't enable caching if using a CSP nonce because then it wouldn't |
438 # be a nonce. |
438 # be a nonce. |
439 if rctx.configbool('web', 'cache', True) and not rctx.nonce: |
439 if rctx.configbool('web', 'cache') and not rctx.nonce: |
440 caching(self, req) # sets ETag header or raises NOT_MODIFIED |
440 caching(self, req) # sets ETag header or raises NOT_MODIFIED |
441 if cmd not in webcommands.__all__: |
441 if cmd not in webcommands.__all__: |
442 msg = 'no such method: %s' % cmd |
442 msg = 'no such method: %s' % cmd |
443 raise ErrorResponse(HTTP_BAD_REQUEST, msg) |
443 raise ErrorResponse(HTTP_BAD_REQUEST, msg) |
444 elif cmd == 'file' and 'raw' in req.form.get('style', []): |
444 elif cmd == 'file' and 'raw' in req.form.get('style', []): |