Skip to content

Use content-length header directly for dart:io #110

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

Merged
merged 1 commit into from
Sep 20, 2017

Conversation

donny-dont
Copy link

The dart:io path failed client tests where content-length was expected to be set. The dart:html path was successful for these tests already.

One solution that seemed to imply a bug in dart:io was moving the headers.set above the setting of contentLength. This worked but this seems to be a better path since by default contentLength is -1 and if it is not set by Message then the behavior is the same. So the code is just deleted.

Additionally it appears that in both Chrome and dart:io the content-length header is stripped when the GET method is called. It is not stripped for DELETE so the test was updated accordingly.

@donny-dont
Copy link
Author

@kevmoo @nex3 let me know if this works.

@nex3
Copy link
Member

nex3 commented Sep 20, 2017

The dart:io path failed client tests where content-length was expected to be set. The dart:html path was successful for these tests already.

How and why were these tests failing? Why does this change fix them?

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.

3 participants