Closed
Bug 1370485
Opened 7 years ago
Closed 7 years ago
Disable lowercase header names in XHR.getAllResponseHeaders()
Categories
(Core :: DOM: Core & HTML, defect, P1)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox53 | --- | unaffected |
firefox54 | --- | unaffected |
firefox55 | + | fixed |
People
(Reporter: shawnjohnjr, Assigned: shawnjohnjr)
References
Details
(Keywords: site-compat, Whiteboard: [webcompat])
Attachments
(1 file)
1.01 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Disable lowercase header names in XHR.getAllResponseHeaders()
Some sites and add-on are not ready for this change.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → shuang
Assignee | ||
Comment 1•7 years ago
|
||
[Tracking Requested - why for this release]:
status-firefox55:
--- → affected
tracking-firefox55:
--- → ?
Assignee | ||
Comment 2•7 years ago
|
||
Currently most of broken sites directly use case-sensitive header name to access array of response headers.
Even site like store.nike.com Japanese version now is broken.
And based on the analysis in [1], we shouldn't under estimate the number of broken sites.
As discussed with Anne, it's better to wait for a couple of releases.
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=716994#c5
Assignee | ||
Comment 3•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8875199 -
Flags: review?(amarchesini)
Comment 4•7 years ago
|
||
Tracking for 55 as webcompat issue
status-firefox53:
--- → unaffected
status-firefox54:
--- → unaffected
status-firefox-esr52:
--- → unaffected
Updated•7 years ago
|
Priority: -- → P1
Comment 5•7 years ago
|
||
We hit this bug working on BuildHub, https://github.com/mozilla-services/buildhub/issues/98.
Comment 6•7 years ago
|
||
As :Baku is on vacation, would if be possible to ask other peers for review?
Flags: needinfo?(shuang)
Flags: needinfo?(overholt)
Comment 7•7 years ago
|
||
Why aren't we just backing out the regressing patch?
Clearly the pref is enabling something not web compatible.
Comment 8•7 years ago
|
||
If comment 7 doesn't work, I'd ask bkelly for review.
Flags: needinfo?(overholt)
Assignee | ||
Comment 9•7 years ago
|
||
Comment on attachment 8875199 [details] [diff] [review]
Bug 1370485 - Do not return lowercased header names for getAllResponseHeaders()
Hi Olli,
The patch is to disable the regression patch bug 1348390 lowercased header name.
The original spec issue https://github.com/whatwg/xhr/issues/109 and https://github.com/whatwg/xhr/commit/ecce3904ace.
getAllResponseHeaders() is supposed to follow steps defined in the Fetch spec, including lowercasing all the header names it returns. Per XHR 4.6.5, make response’s header list sorted and lowercased. That fixes wpt tests XMLHttpRequest/getallresponseheaders-cl, getallresponseheaders.htm, getresponseheader-chunked-trailer.htm
Safari issue, reviewed, patch landed, but I'm not sure when they will release it.
https://bugs.webkit.org/show_bug.cgi?id=169286
http://trac.webkit.org/changeset/214252/webkit
Chrome issue, patch landed, and targets on M60:
https://bugs.chromium.org/p/chromium/issues/detail?id=716994
It seems to me no other browsers disagree the specification update and they are going to change their xhr implementation. HTTP/2 is lowercasing headers, it makes sense to me to go in that direction.
I can backout the regression patch if you prefer.
I understand we should reduce webcompat issues as much as we can. I just wonder when we should make this change or we should make change to xhr spec, make header names case-sensitive again to avoid webcompat issue?
Can you share ideas, how to proceed to resolve this situation?
Flags: needinfo?(shuang)
Attachment #8875199 -
Flags: review?(amarchesini) → review?(bugs)
Comment 10•7 years ago
|
||
But why would we want to keep the code dealing with the pref which is clearly not web compatible?
And I'm now a bit lost here. Did other browsers manage to land the lowercase approach without regressions but we got tons of broken sites?
Comment 11•7 years ago
|
||
Comment on attachment 8875199 [details] [diff] [review]
Bug 1370485 - Do not return lowercased header names for getAllResponseHeaders()
but ok, at least for now we can just disable.
Attachment #8875199 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 12•7 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #10)
> But why would we want to keep the code dealing with the pref which is
> clearly not web compatible?
I hope xhr spec issue can address the webcompat risk sooner.
Anne said we should wait for a couple of releases.
> And I'm now a bit lost here. Did other browsers manage to land the lowercase
> approach without regressions but we got tons of broken sites?
Based on discussion and analysis in https://bugs.chromium.org/p/chromium/issues/detail?id=716994#c5, they choose to land that lowercase approach. As for Safari, I don't see much web compat risk discussion.
Comment 13•7 years ago
|
||
Pushed by shuang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9819afb3f523
Do not return lowercased header names for getAllResponseHeaders(), r=smaug
Updated•7 years ago
|
Whiteboard: [webcompat]
Comment 14•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•7 years ago
|
Keywords: site-compat
Comment 15•7 years ago
|
||
Why didn't we report the web-incompatibility here to the spec issue? Seems like if the spec is not web-compatible, then the spec should change...
Flags: needinfo?(shuang)
Flags: needinfo?(annevk)
Comment 16•7 years ago
|
||
How is this web incompatible? Thus far all the breakage seems outside the web. Having said that, we do have https://github.com/whatwg/xhr/issues/146 tracking this now.
Flags: needinfo?(annevk)
Comment 17•7 years ago
|
||
> Thus far all the breakage seems outside the web
There are multiple bugs on this bug's "Blocks" list that certainly look like "web" to me.
Comment 18•7 years ago
|
||
Hmm, I missed those. I'll update the standards issue.
Assignee | ||
Comment 19•7 years ago
|
||
(In reply to Anne (:annevk) from comment #18)
> Hmm, I missed those. I'll update the standards issue.
Shall I backout both lowercased and sorted? Or just remove lowercased?
webcompat has been reported in bug 1370812.
See: https://webcompat.com/issues/7028
Flags: needinfo?(shuang) → needinfo?(annevk)
Comment 20•7 years ago
|
||
For now just lowercase, since that's what we've had web compat issues with, right? Should see what happens in the spec issue.
Comment 21•7 years ago
|
||
I agree with bz. The specification issue is going nowhere fast. It seems that at least Safari 11 will always lowercase. Would be interesting to know if the websites fail in Safari somehow or manage to work due to different code paths...
Flags: needinfo?(annevk)
Assignee | ||
Comment 22•7 years ago
|
||
(In reply to Anne (:annevk) from comment #21)
> I agree with bz. The specification issue is going nowhere fast. It seems
> that at least Safari 11 will always lowercase. Would be interesting to know
> if the websites fail in Safari somehow or manage to work due to different
> code paths...
Do we need to remove lowercase pref-off for 57? Since the spec issue is already closed. Or we shall do it after 57?
Comment 23•7 years ago
|
||
(In reply to Shawn Huang [:shawnjohnjr] from comment #22)
> (In reply to Anne (:annevk) from comment #21)
> > I agree with bz. The specification issue is going nowhere fast. It seems
> > that at least Safari 11 will always lowercase. Would be interesting to know
> > if the websites fail in Safari somehow or manage to work due to different
> > code paths...
>
> Do we need to remove lowercase pref-off for 57? Since the spec issue is
> already closed. Or we shall do it after 57?
In consideration of how late we are at nightly 57 and the quality of 57 should really be the focus for us, I am concerned the webcompat risk. Additionally, I don't really get big benefit we ship this (remove pref0-off) at this moment, doing it post 57 sounds a better plan to me. Anne, :bz, what do you think?
Flags: needinfo?(bzbarsky)
Flags: needinfo?(annevk)
Comment 24•7 years ago
|
||
I think you're right. We might at some point hit compatibility issues of the opposite nature due to Chrome and Safari lowercasing, but waiting with lowercasing until Firefox 58's Nightly arrives seems good. And to be clear, I think we should keep the preference available throughout Firefox 58 so we can easily revert if something breaks. We can remove the preference itself in Firefox 59 or 60 or so.
Flags: needinfo?(annevk)
Comment 25•7 years ago
|
||
Should we open a new bug to track lowercasing or reopen this one?
Assignee | ||
Comment 26•7 years ago
|
||
(In reply to Anne (:annevk) from comment #24)
> I think you're right. We might at some point hit compatibility issues of the
> opposite nature due to Chrome and Safari lowercasing, but waiting with
> lowercasing until Firefox 58's Nightly arrives seems good. And to be clear,
> I think we should keep the preference available throughout Firefox 58 so we
> can easily revert if something breaks. We can remove the preference itself
> in Firefox 59 or 60 or so.
Yeah, I think we should play safe for 57. I asked simply because the spec issue has been stopped for a while.
I will open new issue for this.
Assignee | ||
Comment 27•7 years ago
|
||
(In reply to Anne (:annevk) from comment #25)
> Should we open a new bug to track lowercasing or reopen this one?
Bug 1398718.
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•