Re: [whatwg/fetch] Cannot get next URL for redirect="manual" (#763)

Ran into the same issue today. Had an API login endpoint return 303 when we wanted the browser to do a full page redirect. Obviously we didn't want the fetch request doing the redirect itself, so set redirect to manual, expecting to be able to fetch the Location header from the 303 response. And then struggled to figure out why we couldn't for an hour until finally stumbling on this ticket. So we ended up changing our 303's into 204's with a Location header instead, which isn't correct but works. I would recommend a rethink of not having the Location header in the 303 response for manual redirections. It is confusing behaviour. At the very least, browsers should show a message pointing to this ticket if users try to access the headers of the Response object. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/763#issuecomment-1430650132
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/763/1430650132@github.com>

Received on Wednesday, 15 February 2023 02:07:01 UTC