home / django_tickets / tickets

tickets: 2504

This data as json

id created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
2504 2006-08-09 16:54:09 2012-10-20 19:34:24 2022-03-06 03:26:11.344790 Accepted closed Core (Other) Bug Normal dev duplicate ConditionalGetMiddleware causes Content-Length to be 0 on HttpResponse with fileobject middleware/http.py: {{{ if not response.has_header('Content-Length'): response['Content-Length'] = str(len(response.content)) }}} If response is build with a file object, str(len(response.content)) is 0, and the browser will ignore the page, if the handler does not set content-length. If response.content is not a string, do not add Content-Length. Optional we could implement: If response.content is a file like object, and content.name is a valid filename, we could get the size with os.path.getsize and those. aaugustin django@poelzi.org   0 1 1 0 0 0
Powered by Datasette · Queries took 1.37ms