Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunked response support for werkzeug.serving #2090

Closed
rawler opened this issue Apr 19, 2021 · 1 comment · Fixed by #2091
Closed

Chunked response support for werkzeug.serving #2090

rawler opened this issue Apr 19, 2021 · 1 comment · Fixed by #2091
Labels
Milestone

Comments

@rawler
Copy link
Contributor

rawler commented Apr 19, 2021

This is a new attempt to solve #1327, with a slightly different approach, and for a specific reason; explicit failures.

Right now, if a generator-driven response fails mid-stream, the error-handler may or may not add some error-description to the end of stream, before closing connection. A client will typically not distinguish this from a successful completed request. Unless the response is carefully inspected, the crash will go on undetected. In the worst case, for opaque response content, or when running with passthrough_errors, the response may be truncated in a way that cannot be detected by the client.

For HTTP-clients, such as Python stdlib, using Transfer-Encoding: chunked activates automatic detection of truncated response (http.client.IncompleteRead is thrown). Given that any HTTP/1.1-supporting client is mandated to support chunking, this should be a justifiable change in behavior.

@davidism
Copy link
Member

#1328 (comment)

@davidism davidism reopened this Apr 24, 2021
@davidism davidism added this to the 2.1.0 milestone Jan 28, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants