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

HttpServer shouldn't default to chunked transfer-encoding for empty-bodied responses #27660

Open
nex3 opened this Issue Oct 24, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@nex3
Member

nex3 commented Oct 24, 2016

Currently, HttpServer defaults to chunked transfer-encoding for all responses. This can corrupt some responses which don't allow a body, since the server will send a single 0 as the body length. In particular, responses with status codes 204 and 304 require that no body exist, and writing the zero is breaking users' proxy servers in practice (see dart-lang/shelf#60).

nex3 added a commit to dart-lang/shelf that referenced this issue Oct 24, 2016

Accept List<int> message bodies.
This also automatically sets the content-length header when possible,
and works around dart-lang/sdk#27660.

nex3 added a commit to dart-lang/shelf that referenced this issue Oct 24, 2016

Accept List<int> message bodies.
This also automatically sets the content-length header when possible,
and works around dart-lang/sdk#27660.

Closes #60

nex3 added a commit to dart-lang/shelf that referenced this issue Oct 24, 2016

Accept List<int> message bodies. (#61)
This also automatically sets the content-length header when possible,
and works around dart-lang/sdk#27660.

Closes #60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment