Re: [whatwg/fetch] Browsers preserve fragments on redirects (#505)

@yutakahirano Well, `respondWith` simply doesn't overwrite the `response.url` with `request.url` any more.  I couldn't figure out how the SVG code actually accesses the url from the response.  Arguably it could use the internal url representation, but its unclear to me.

Currently in gecko, though, we don't preserve the fragment in the Response internally because it would require extra work to properly store it in Cache API, etc.  It sounds like we will need to add that, but currently we don't.

Besides that specific bug, though, it does seem reasonable to at least apply the request URL fragment to the response URL since its what browsers do for redirects.

Note, I believe the WPT reftest I added in https://bugzilla.mozilla.org/show_bug.cgi?id=1437760 would be satisfied by any of these implementations:

* legacy behavior of overwriting the response.url with the request.url
* propagating the internal response url with a fragment
* applying the request.url fragment to the response.url

So I hope that test is not controversial.

-- 
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/505#issuecomment-367382084

Received on Wednesday, 21 February 2018 16:23:36 UTC