Commit b339c5f6 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

patch: Delete the 'Content-Length' header when the status code equals 304

parent ad17d57e
......@@ -26,6 +26,11 @@ def finalize(self):
headers = self.headers
body = self.body
# There's a bug in 'App.ImageFile.index_html': when it returns a 304 status
# code, 'Content-Length' is equal to a nonzero value.
if self.status == 304:
headers.pop('content-length', None)
# set 204 (no content) status if 200 and response is empty
# and not streaming
if ('content-type' not in headers and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment