Opened 16 months ago

Closed 16 months ago

Last modified 16 months 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: master
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 Changed 16 months ago by Tim Graham

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

comment:2 Changed 16 months ago by Tim Graham

Resolution: worksforme
Status: newclosed
Summary: Response is not necessarrily rendered when response middlewares are appliedResponse 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 Changed 16 months ago by Sébastien Diemer

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