fix cache

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-09 11:23:24 +02:00
1 parent 0973129c17
commit cc2910afa9
3 files changed
+23

No files matched your search

+4
View File
@@ -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")