Closed
Bug 1348390
Opened 7 years ago
Closed 7 years ago
Permfail: XMLHttpRequest/getallresponseheaders.htm assert_equals: expected "also-here: Mr. PB\r\newok: lego\r\nfoo-test: 1, 2\r\n" but got "foo-TEST: 1, 2\r\nALSO-here: Mr. PB\r\newok: lego\r\n"
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: aryx, Assigned: shawnjohnjr)
References
Details
(Keywords: dev-doc-needed, Whiteboard: [stockwell disabled])
Attachments
(1 file, 4 obsolete files)
https://treeherder.mozilla.org/logviewer.html#?job_id=84702273&repo=mozilla-inbound At least three times on the inbound tree at the moment, all Linux opt (both 32 and 64 bit). Test landed two days ago as part of bug 1345490. [task 2017-03-17T18:51:43.112234Z] 18:51:43 INFO - TEST-START | /XMLHttpRequest/getallresponseheaders.htm [task 2017-03-17T18:51:43.327068Z] 18:51:43 INFO - [task 2017-03-17T18:51:43.328185Z] 18:51:43 INFO - TEST-UNEXPECTED-FAIL | /XMLHttpRequest/getallresponseheaders.htm | XMLHttpRequest: getAllResponseHeaders() - assert_equals: expected "foo-test: 1, 2, 3\r\n" but got "foo-TEST: 1, 2, 3\r\n" [task 2017-03-17T18:51:43.328578Z] 18:51:43 INFO - client.onload<@http://web-platform.test:8000/XMLHttpRequest/getallresponseheaders.htm:10:5 [task 2017-03-17T18:51:43.329074Z] 18:51:43 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1409:20 [task 2017-03-17T18:51:43.331013Z] 18:51:43 INFO - Test.prototype.step_func_done/<@http://web-platform.test:8000/resources/testharness.js:1449:17 [task 2017-03-17T18:51:43.331084Z] 18:51:43 INFO - EventHandlerNonNull*@http://web-platform.test:8000/XMLHttpRequest/getallresponseheaders.htm:9:19 [task 2017-03-17T18:51:43.331145Z] 18:51:43 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1409:20 [task 2017-03-17T18:51:43.331202Z] 18:51:43 INFO - async_test@http://web-platform.test:8000/resources/testharness.js:518:13 [task 2017-03-17T18:51:43.331260Z] 18:51:43 INFO - @http://web-platform.test:8000/XMLHttpRequest/getallresponseheaders.htm:7:1 [task 2017-03-17T18:51:43.331294Z] 18:51:43 INFO - . [task 2017-03-17T18:51:43.331343Z] 18:51:43 INFO - TEST-OK | /XMLHttpRequest/getallresponseheaders.htm | took 215ms
Reporter | ||
Updated•7 years ago
|
Keywords: intermittent-failure
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment 4•7 years ago
|
||
this is a new failure as of the 17th where bug 1345490 landed which updated wpt and tests. From what I can tell this test was added then and shortly afterwards this started failing (81 failures to date since then): https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1348390&startday=2017-03-14&endday=2017-03-22&tree=all :jgraham, can you look into fixing this bug or disabling it? This appears to be a linux32/64 thing, opt/debug as well.
Flags: needinfo?(james)
Whiteboard: [stockwell needswork]
Comment 5•7 years ago
|
||
Anne: your test seems to be unstable. Can we fix it or should it be disabled?
Flags: needinfo?(annevk)
Comment hidden (Intermittent Failures Robot) |
Updated•7 years ago
|
Flags: needinfo?(james)
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 8•7 years ago
|
||
According to: https://github.com/whatwg/xhr/issues/109 We should do header casing/header sorting. This doesn't seem to be an intermittent bug now, but a perma failure.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → shuang
Assignee | ||
Comment 9•7 years ago
|
||
I think it's better to disable it first then fix it. It's not an intermittent bug at my side. If anyone has solution, feel free to take it.
Comment 10•7 years ago
|
||
I am happy to review the patch for disabling these until we have more info to fix the bug.
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 14•7 years ago
|
||
Attachment #8851481 -
Flags: review?(jmaher)
Assignee | ||
Updated•7 years ago
|
Keywords: leave-open
Assignee | ||
Comment 15•7 years ago
|
||
Clear ni, since I'm going to fix this bug.
Flags: needinfo?(annevk)
Comment 16•7 years ago
|
||
Comment on attachment 8851481 [details] [diff] [review] Bug 1348390 - Disable new XHR wpt for instability Review of attachment 8851481 [details] [diff] [review]: ----------------------------------------------------------------- thanks!
Attachment #8851481 -
Flags: review?(jmaher) → review+
Comment 17•7 years ago
|
||
Pushed by shuang@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/854b5f25ff67 Disable new XHR wpt for instability, r=jmaher
Updated•7 years ago
|
Whiteboard: [stockwell needswork] → [stockwell disabled]
Comment 18•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/854b5f25ff67
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 21•7 years ago
|
||
Assignee | ||
Comment 22•7 years ago
|
||
Hi Anne, I'm new here. I tried to fix getallresponseheaders case. But I found bug 1293881 showing concerns to match the current XHR specification, it lowercased all incoming header names. In that bug, it says that "There's no guarantee that this (behavioral) change will be web-compatible, so it was decided to revert it." Since XHR specification also suggests we should run 'sort and combine' with response’s header list, do we really have potential lowercased web-compatible issue here? Now I'm not sure if we have any potential risk. Although I think it makes sense to consider header name case insensitive. It seems to me to follow the new XHR spec is the right thing to do.
Flags: needinfo?(annevk)
Comment 23•7 years ago
|
||
There's some risk here, yes: https://groups.google.com/a/chromium.org/d/msg/blink-dev/_oxlCPNsrck/2FePT4QaBwAJ. Safari has already shipped the lowercasing behavior, but that could still mean that we run into issues. The safest solution might be to ship it with a flag that we can quickly toggle if there's a problem. (Note that the standard no longer requires lowercasing request headers either.)
Flags: needinfo?(annevk)
Assignee | ||
Comment 24•7 years ago
|
||
Change summary since the original bug has been fixed in bug 1334776.
Summary: Intermittent /XMLHttpRequest/getallresponseheaders.htm | XMLHttpRequest: getAllResponseHeaders() - assert_equals: expected "foo-test: 1, 2, 3\r\n" but got "foo-TEST: 1, 2, 3\r\n" → Permfail: XMLHttpRequest/getallresponseheaders.htm assert_equals: expected "also-here: Mr. PB\r\newok: lego\r\nfoo-test: 1, 2\r\n" but got "foo-TEST: 1, 2\r\nALSO-here: Mr. PB\r\newok: lego\r\n"
Assignee | ||
Updated•7 years ago
|
Attachment #8867070 -
Attachment is obsolete: true
Assignee | ||
Comment 25•7 years ago
|
||
Assignee | ||
Comment 26•7 years ago
|
||
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3a74a12de228c0b6e48754e196a332fe7474baf1
Assignee | ||
Comment 27•7 years ago
|
||
(In reply to Shawn Huang [:shawnjohnjr] from comment #26) > try: > https://treeherder.mozilla.org/#/ > jobs?repo=try&revision=3a74a12de228c0b6e48754e196a332fe7474baf1 So this also fixes two tests :-O TEST-UNEXPECTED-PASS | /XMLHttpRequest/getresponseheader-chunked-trailer.htm | XMLHttpRequest: getResponseHeader() and HTTP trailer - expected FAIL TEST-UNEXPECTED-PASS | /XMLHttpRequest/getallresponseheaders-cl.htm | Casing of known headers - expected FAIL
Assignee | ||
Updated•7 years ago
|
Attachment #8868041 -
Attachment is obsolete: true
Assignee | ||
Comment 28•7 years ago
|
||
Assignee | ||
Comment 29•7 years ago
|
||
Comment on attachment 8868094 [details] [diff] [review] Bug 1348390 - Sort and lowercase response's header lists for getAllResponseHeaders() Based on Anne's suggestion, I added pref to disable lowercase.
Attachment #8868094 -
Flags: review?(amarchesini)
Comment 30•7 years ago
|
||
Comment on attachment 8868094 [details] [diff] [review] Bug 1348390 - Sort and lowercase response's header lists for getAllResponseHeaders() Review of attachment 8868094 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/xhr/XMLHttpRequestMainThread.cpp @@ +3770,5 @@ > NS_IMETHODIMP XMLHttpRequestMainThread:: > nsHeaderVisitor::VisitHeader(const nsACString &header, const nsACString &value) > { > if (mXHR.IsSafeHeader(header, mHttpChannel)) { > + if (!Preferences::GetBool("dom.xhr.lowercase_header.enabled", false)) { we should use AddBoolCache() here. We should cache other boolean prefs in this file, actually. Follow up? @@ +3771,5 @@ > nsHeaderVisitor::VisitHeader(const nsACString &header, const nsACString &value) > { > if (mXHR.IsSafeHeader(header, mHttpChannel)) { > + if (!Preferences::GetBool("dom.xhr.lowercase_header.enabled", false)) { > + Unused << mHeaderList.InsertElementSorted(HeaderEntry(header, value), if (!mHeaderList.InsertElementSorted(HeaderEntry(header, value), fallible)) { return NS_ERROR_OUT_OF_MEMORY; } @@ +3779,5 @@ > + > + nsAutoCString lowerHeader(header); > + ToLowerCase(lowerHeader); > + Unused << mHeaderList.InsertElementSorted(HeaderEntry(lowerHeader, value), > + fallible); same here. ::: dom/xhr/XMLHttpRequestMainThread.h @@ +626,5 @@ > : mXHR(aXMLHttpRequest), mHttpChannel(aHttpChannel) {} > + const nsACString &Headers() > + { > + for (uint32_t i = 0; i < mHeaderList.Length(); i++) { > + HeaderEntry header = mHeaderList.ElementAt(i); HeaderEntry& header
Attachment #8868094 -
Flags: review?(amarchesini) → review+
Assignee | ||
Updated•7 years ago
|
Attachment #8868094 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8851481 -
Attachment is obsolete: true
Assignee | ||
Comment 31•7 years ago
|
||
Assignee | ||
Comment 32•7 years ago
|
||
Like Bug 1341376, I will open an follow-up bug to take care of |AddBoolCache()|.
Assignee | ||
Updated•7 years ago
|
Keywords: leave-open
Assignee | ||
Updated•7 years ago
|
Component: web-platform-tests → DOM
Product: Testing → Core
Assignee | ||
Comment 33•7 years ago
|
||
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=0a48958c65f160e61517c8123140414e8703ab64
Assignee | ||
Comment 34•7 years ago
|
||
Follow-up: bug 1365478
Comment 35•7 years ago
|
||
Pushed by shuang@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/8cb64c677091 Sort and lowercase response's header lists for getAllResponseHeaders(), r=baku
Comment 36•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8cb64c677091
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment 37•7 years ago
|
||
Unfortunately this broke Nike's Japanese storefront (reported at https://webcompat.com/issues/7028). For instance, see http://store.nike.com/jp/ja_jp/product/lunarepic-flyknit-low-2-id/?piid=43767&pbid=547557084 The page never renders, and the console logs this: >Unhandled promise rejection TypeError: e.headers['Content-Type'] is undefined Sure enough, e.headers contains "content-type" rather than "Content-Type", and setting dom.xhr.lowercase_header.enabled=false makes the problem go away.
Assignee | ||
Comment 38•7 years ago
|
||
It looks like Chrome also introduced this change. See: https://codereview.chromium.org/2828753002 Yeah, I will disable lowercase for now and wait for other vendors shipping this feature.
Assignee | ||
Comment 39•7 years ago
|
||
See also: Safari https://bugs.webkit.org/show_bug.cgi?id=169286
Assignee | ||
Comment 40•7 years ago
|
||
(In reply to Shawn Huang [:shawnjohnjr] from comment #38) > It looks like Chrome also introduced this change. > See: > https://codereview.chromium.org/2828753002 > > Yeah, I will disable lowercase for now and wait for other vendors shipping > this feature. https://bugs.chromium.org/p/chromium/issues/detail?id=716994
Comment 41•7 years ago
|
||
For posterity: Please add keyword "dev-doc-needed" for bugs like this. Lowercasing should be documented here https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders and elsewhere. Don't forget the keyword where lowercasing header names gets enabled later.
Assignee | ||
Updated•7 years ago
|
Keywords: intermittent-failure → dev-doc-needed
Assignee | ||
Comment 42•7 years ago
|
||
Follow-up web-compat discussion: https://github.com/whatwg/xhr/issues/146
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•