Summary: | XMLHttpRequest: make setRequestHeader() use `, ` as separator (including a space) | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Anne van Kesteren <annevk> | ||||
Component: | DOM | Assignee: | youenn fablet <youennf> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | achristensen, ap, cdumez, cgarcia, commit-queue, youennf | ||||
Priority: | P2 | ||||||
Version: | Safari Technology Preview | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=168115 | ||||||
Attachments: |
|
Description
Anne van Kesteren
2017-03-07 09:51:26 PST
We just changed it to never add a space, in part because doing otherwise would be complicated for CFNetwork based ports. If we change XHR to use ', ', we will also change it to fetch. Currently we are using ',' for both, except when CFNetwork is changing that behind the scene, which it should really not. I have been trying to get your input in the issue, but am glad filing bugs is working out better. It sounds like the preference from WebKit is that we only have a single separator style, used by: XMLHttpRequest WebSocket Fetch API CORS Knowing that makes it easier to talk with the other browsers. I suspect what we want to do is use `, ` and also change Fetch to use that and any Fetch API tests. `Access-Control-Request-Headers` seems tricky though, as I believe no browser uses a space after the commas there now. Is that problematic? (In reply to comment #3) > I have been trying to get your input in the issue, but am glad filing bugs > is working out better. Sorry about that, I plan to get back to fetch/XHR soon. I should probably improve my GitHub notification filter. > It sounds like the preference from WebKit is that we only have a single > separator style, used by: > > XMLHttpRequest > WebSocket > Fetch API > CORS Right. > Knowing that makes it easier to talk with the other browsers. I suspect what > we want to do is use `, ` and also change Fetch to use that and any Fetch > API tests. Yes, that is probably the most interoperable choice. > `Access-Control-Request-Headers` seems tricky though, as I believe no > browser uses a space after the commas there now. Is that problematic? WebKit is already using `,` here so no problem, except the small inconsistency. It seems Mozilla is tentatively okay with making this change. I prepared three pull requests to make this setup work: https://github.com/whatwg/fetch/pull/504 https://github.com/whatwg/xhr/pull/130 https://github.com/w3c/web-platform-tests/pull/5115 If I missed tests that need updating I'd appreciate your help with that. I'd also appreciate any review. Sure, I'll update WebKit side and upstream any needed change to WPT (To be clear, I don't know if Mozilla is okay with lowercasing header names and reordering them for getAllResponseHeaders(). Those two items still need to be battle-tested somehow, but aligning on `, ` seems okay.) Created attachment 304069 [details]
Patch
Comment on attachment 304069 [details] Patch Clearing flags on attachment: 304069 Committed r213766: <http://trac.webkit.org/changeset/213766> All reviewed patches have been landed. Closing bug. |