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

getAllResponseHeaders does not include trailing CRLF #202

Open
jsedlacek opened this issue Sep 7, 2017 · 2 comments
Open

getAllResponseHeaders does not include trailing CRLF #202

jsedlacek opened this issue Sep 7, 2017 · 2 comments

Comments

@jsedlacek
Copy link

According to spec, the getAllResponseHeaders should include trailing CRLF:
https://xhr.spec.whatwg.org/#the-getallresponseheaders()-method

Xdomains implementation does not contain trailing CRLF.
https://github.com/jpillora/xdomain/blob/gh-pages/vendor/xhook.js#L226

This breaks behavior of superagent, which pops the trailing CRLF:
https://github.com/visionmedia/superagent/blob/master/lib/client.js#L203

With xdomain trailing CRLF is not present, so the last header gets stripped.

@jpillora
Copy link
Owner

jpillora commented Sep 7, 2017 via email

@jsedlacek
Copy link
Author

jsedlacek commented Sep 8, 2017

Thanks, I have created the upstream issue as well.
jpillora/xhook#72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants