New issue
Advanced search Search tips

Issue 698241 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 615313
Owner: ----
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

XMLHttpRequest setRequestHeader ( customField, value ) will cause cross domain request failed

Reported by ke.zhang...@gmail.com, Mar 3 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Steps to reproduce the problem:
1. new XMLHttpRequest(), and open an cross domain url
2. invoke the method setRequestHeader with custom field
3. send the call ,and it success at HTTP-OPITIONS with 204, but failed go on execute the HTTP-GET method

What is the expected behavior?
same behaviors as the same domain call

What went wrong?
setRequestHeader with custom field should not effect the request call

Did this work before? No 

Does this work in other browsers? No

Chrome version: 56.0.2924.87  Channel: stable
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 24.0 r0

 
Screen Shot 2017-03-03 at 22.25.20.png
103 KB View Download
x_domain_failed_case.html
845 bytes View Download
Labels: Needs-Bisect Needs-Triage-M56
Labels: -Needs-Bisect -Needs-Triage-M56
Status: WontFix (was: Unconfirmed)
Please see https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS. The preflight response needs an Access-Control-Request-Headers header.
Thanks! Got it. While I found 'Access-Control-Allow-Headers': '*' is not work, I must enumerate all the custom fields in the response header.
Mergedinto: 615313
Status: Duplicate (was: WontFix)
Ah, I see, then it is  issue 615313 .

Sign in to add a comment