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

Fetch/XHR: test parsing of WWW-Authenticate response header #13006

Merged
merged 2 commits into from
Sep 19, 2018

Conversation

annevk
Copy link
Member

@annevk annevk commented Sep 14, 2018

@jobisoft
Copy link

Have you run this test already? The tests for XHR will probably fail, because XHR returns them "as is"

1\n2\n3,4

@annevk
Copy link
Member Author

annevk commented Sep 14, 2018

Yeah, that's a bug in Firefox. Other browsers don't have that problem.

@jobisoft
Copy link

Ok, so the new tests are for after this header stuff has been fixed to match the fetch() API?

I do not want to post this in the bug 1491010, because I do not want to take it off topic. But when you change the behaviour in XHR, can you please expose the "true" header string when getAllResponseHeaders() is called?

From your tests it looks like you want to touch that as well. I think being able to get access to what has actually been send is vital. If the user requests a single header, getting back the comma-joined string is OK, but I should also be able to get the original string.

@annevk
Copy link
Member Author

annevk commented Sep 14, 2018

There's no standard that supports the behavior you want and I don't think it'd be a good idea to special case headers or pass through the server data as-is (as proxies and such could also have meddled with it).

@jobisoft
Copy link

Ok, but then you need to get this in the official MDN documentation of XHR as fast as possible, so that coders like me do not rely on the current behaviour.

I was actually thinking about switching from fetch() to XHR because of the current behaviour.

@youennf youennf merged commit 91170c8 into master Sep 19, 2018
@annevk annevk deleted the annevk/www-authenticate branch September 20, 2018 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants