New issue
Advanced search Search tips

Issue 857582 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Fetch: Request mode is "no-cors" but the redirect mode is not "follow".

Project Member Reported by landry@google.com, Jun 28 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Steps to reproduce the problem:
1. fetch('https://www.google.com/mail', {mode: 'no-cors', redirect: 'manual'})

What is the expected behavior?
on Chrome/67.0.3396.99, this worked as I'd expect it to: returning an opaqueredirect:

fetch('https://www.google.com/mail', {mode: 'no-cors', redirect: 'manual'})
Promise {<pending>}
__proto__
:
Promise
[[PromiseStatus]]
:
"resolved"
[[PromiseValue]]
:
Response
body
:
(...)
bodyUsed
:
false
headers
:
Headers {}
ok
:
false
redirected
:
false
status
:
0
statusText
:
""
type
:
"opaqueredirect"
url
:
"https://www.google.com/mail"
__proto__
:
Response

What went wrong?
on Chrome/69 I get this instead:
VM1219:1 Fetch API cannot load https://google.com/mail. Request mode is "no-cors" but the redirect mode  is not "follow".
(anonymous) @ VM1219:1
PromiseĀ {<rejected>: TypeError: Failed to fetch
    at <anonymous>:1:1}__proto__: Promise[[PromiseStatus]]: "rejected"[[PromiseValue]]: TypeError: Failed to fetch
    at <anonymous>:1:1

which seems like a regression, unless it is intentional?

Did this work before? Yes 67.0.3396.99

Does this work in other browsers? N/A

Chrome version: 69.0.3472.3  Channel: stable
OS Version: 
Flash Version:
 

Comment 1 by landry@google.com, Jun 28 2018

Also reproduces on beta channel Chrome/68.0.3440.42
Labels: Needs-Bisect Needs-Triage-M69

Comment 3 by ricea@chromium.org, Jun 29 2018

Components: -Blink>Network Blink>SecurityFeature>CORS Blink>Network>FetchAPI
Status: WontFix (was: Unconfirmed)
Looks like this is a fix for standards compliance: https://fetch.spec.whatwg.org/#ref-for-concept-request-redirect-mode%E2%91%A0

It makes sense: the old behaviour leaks information (the fact that the response was a redirect).

Sign in to add a comment