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

Update Transfer-Encoding logic. #66

Merged
merged 1 commit into from Dec 6, 2016
Merged

Update Transfer-Encoding logic. #66

merged 1 commit into from Dec 6, 2016

Conversation

nex3
Copy link
Member

@nex3 nex3 commented Dec 6, 2016

This should be the last CL in this unfortunate series. The adapter
requirements have been updated to consistently ensure that a Message's
body is in the chunked format if and only if its headers indicate that
it should be.

Closes #64

if (coding != null && !equalsIgnoreAsciiCase(coding, 'identity')) {
// If the response is already in a chunked encoding, de-chunk it because
// otherwise `dart:io` will try to add another layer of chunking. See
// sdk#27886.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gross. (the issue)
Maybe add a TODO to remove this branch afterwards?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

This should be the last CL in this unfortunate series. The adapter
requirements have been updated to consistently ensure that a Message's
body is in the chunked format if and only if its headers indicate that
it should be.

Closes #64
@nex3 nex3 merged commit 90a021d into master Dec 6, 2016
@nex3 nex3 deleted the transfer-encoding branch December 6, 2016 23:19
natebosch added a commit that referenced this pull request May 3, 2022
Reduce nesting by extracting to a method allowing guard clauses and
inverted the conditionals with early returns. Remove some comments that
repeat the code. Use conditional map elements and `..[]` operator to
reduce the noise around setting headers.

Add tests for requests where the range header is ignored.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants