Skip to content

Fixed bug in splitting headers #81

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 11, 2016
Merged

Fixed bug in splitting headers #81

merged 1 commit into from
Sep 11, 2016

Conversation

jasonzoladz
Copy link
Contributor

First, thanks for all your work on Purescript and its libraries. I benefit greatly from your work.

I found and fixed a nasty bug this morning...

xhr.getAllResponseHeaders() returns the headers separated by CRLF, not just LF.

See here and here.

Presently, purescript-affjax splits only on \n. See here.

Ordinarily, it wouldn't be a problem. But when your workflow involves extracting an 'X-Auth-Token' from the header of an AJAX response, and then sending that token value as a header value of a new AJAX request, the new request will error out if the header value contains CR (or LF).

@jdegoes jdegoes added the type: bug Something that should function correctly isn't. label Sep 10, 2016
@garyb
Copy link
Member

garyb commented Sep 11, 2016

Thanks!

@garyb garyb merged commit d89aa80 into purescript-contrib:master Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something that should function correctly isn't.
Development

Successfully merging this pull request may close these issues.

3 participants