Closed
Bug 1554539
Opened 7 years ago
Closed 7 years ago
access-control-basic-post-with-non-cors-safelisted-content-type.htm should fail because of missing request header
Categories
(Testing :: web-platform-tests, defect)
Tracking
(firefox69 fixed)
RESOLVED
FIXED
mozilla69
| Tracking | Status | |
|---|---|---|
| firefox69 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
While running this test, the first fetch of http://w3c-test.org/xhr/resources/access-control-basic-options-not-supported.py fails with:
{"error": {"message": "Traceback (most recent call last):\n File \"/u/www.w3c-test.org/web-platform-tests/master/tools/wptserve/wptserve/handlers.py\", line 310, in __call__\n rv = self.func(request, response)\n File \"/u/www.w3c-test.org/web-platform-tests/master/xhr/resources/access-control-basic-options-not-supported.py\", line 7, in main\n response.headers.set(\"Access-Control-Allow-Origin\", request.headers.get(\"origin\"))\n File \"/u/www.w3c-test.org/web-platform-tests/master/tools/wptserve/wptserve/response.py\", line 331, in set\n value = _maybe_encode(value)\n File \"/u/www.w3c-test.org/web-platform-tests/master/tools/wptserve/wptserve/response.py\", line 315, in _maybe_encode\n raise TypeError(\"Unexpected value in ResponseHeaders: %r\" % s)\nTypeError: Unexpected value in ResponseHeaders: None\n", "code": 500}}
This happens because the Origin header is missing on that request. For some reason, when running this test with ./mach wpt the test doesn't fail.
| Assignee | ||
Comment 1•7 years ago
|
||
To be clear, the real problem is that the test is trying to detect whether the browser sends the Origin header with POST requests (which we don't) and it fails at doing that.
Summary: access-control-basic-post-with-non-cors-safelisted-content-type.htm fails because of missing request header → access-control-basic-post-with-non-cors-safelisted-content-type.htm should fail because of missing request header
| Assignee | ||
Comment 2•7 years ago
|
||
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7055c90b69dc
Fix access-control-basic-options-not-supported.py to consistently fail if the Origin header is unexpectedly missing; r=jgraham
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/17044 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Comment 6•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox69:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Updated•7 years ago
|
Assignee: nobody → ehsan
Upstream PR merged
You need to log in
before you can comment on or make changes to this bug.
Description
•