Re: [whatwg/fetch] Script-created redirects responses have no location URL (#1146)

I agree with @annevk that throwing based on headers in `new Response()` doesn't seem reasonable. I wouldn't object to doing it via status code, but then we risk other compatibility issues if folks were constructing absolute redirects. The next earliest time to report an error would be in resolving the redirect, which I believe is what already happens?

As for RFC7231, that talks about normal HTTP. Synthetic response from service workers are weird enough that Fetch would need to be consulted for what the "effective request URI" is, and right now it's defined to not have one. We could say to use the response URL if it exists, and otherwise the request URL, but that seems weirdly special-case-y.

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

Received on Monday, 19 April 2021 14:42:24 UTC