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

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

Open
nex3 opened this issue Oct 24, 2016 · 0 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@nex3
Copy link
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 nex3 added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Oct 24, 2016
nex3 added a commit to dart-lang/shelf that referenced this issue Oct 24, 2016
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
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
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
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

1 participant