fix cache
This commit is contained in:
1 parent
0973129c17
commit
cc2910afa9
3 files changed
+23
No files matched your search
@@ -162,6 +162,10 @@ def convert():
|
||||
# the final representation. It may return 304 only after validating
|
||||
# the complete content hash. Never use the source's validators.
|
||||
resp.make_conditional(request)
|
||||
# Werkzeug adds Date during make_conditional(), while Uvicorn adds
|
||||
# its own Date. Two Date fields make RustProxy 0.29.3 reject caching.
|
||||
# Leave Date generation to the HTTP server, including for HTTP 304.
|
||||
resp.headers.pop("Date", None)
|
||||
if resp.status_code == 304:
|
||||
result.output.close()
|
||||
redis_client.incr("stats:conversions_success")
|
||||
|
||||
Reference in new issue
Block a user