Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#28430 closed Bug (worksforme)

Response is not necessarily rendered when response middlewares are applied

Reported by: Sébastien Diemer Owned by: nobody
Component: Uncategorized Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

According to ​this part of the code, a request is not necessarily rendered when response middlewares are applied.
However ​this part of the code of CommonMiddleware assumes that the response is already rendered (taking its content-length).

There seems to be an inconsistency here.

Change History (3)

comment:1 by Tim Graham, 9 years ago

Can you give some details (such as a sample project) that demonstrate a concrete example of the issue?

comment:2 by Tim Graham, 9 years ago

Resolution: → worksforme
Status: new → closed
Summary: Response is not necessarrily rendered when response middlewares are applied → Response is not necessarily rendered when response middlewares are applied

2f615b10e6330d27dccbd770a4628200044acf70 is the commit that allowed TemplateResponse to be returned from error handlers. The response in test_handler_renders_template_response has a Content-Length so I don't see the issue here. Feel free to reopen with specific steps to reproduce a problem.

comment:3 by Sébastien Diemer, 9 years ago

Ok, I wasn't able to replicate the issue on a simple Django project. Thank you for your time.

Note: See TracTickets for help on using tickets.
Back to Top