зеркало из https://github.com/mozilla/gecko-dev.git
Bug 845881. Go back to allowing any 2xx response code to a preflight request, since web sites do that. r=sicking
This commit is contained in:
Родитель
39b0529599
Коммит
f130eaefeb
|
@ -515,11 +515,10 @@ nsCORSListenerProxy::CheckRequestApproved(nsIRequest* aRequest)
|
|||
}
|
||||
|
||||
if (mIsPreflight) {
|
||||
// Preflights only succeed if the response has a 200 status
|
||||
uint32_t status;
|
||||
rv = http->GetResponseStatus(&status);
|
||||
bool succeedded;
|
||||
rv = http->GetRequestSucceeded(&succeedded);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (status != 200) {
|
||||
if (!succeedded) {
|
||||
return NS_ERROR_DOM_BAD_URI;
|
||||
}
|
||||
|
||||
|
|
|
@ -512,7 +512,7 @@ function runTest() {
|
|||
allowHeaders: "x-my-header",
|
||||
preflightStatus: 200
|
||||
},
|
||||
{ pass: 0,
|
||||
{ pass: 1,
|
||||
method: "GET",
|
||||
headers: { "x-my-header": "header value" },
|
||||
allowHeaders: "x-my-header",
|
||||
|
|
Загрузка…
Ссылка в новой задаче