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

Not sure if there is a separate issue for fragment in Responses, but I have a service worker related issue.

I have a bug report here:

https://bugzilla.mozilla.org/show_bug.cgi?id=1437760

Its an issue related to fragments and SVG.  The site in question just does a simple pass-through like `evt.respondWith(fetch(evt.request))`.  The request itself is for an svg resource with a fragment.  The CSS of the site looks for the fragment on the svg to determine how its rendered.

Prior to our work to propagate the synthetic Response.url back out to the intercepted network request this code would just use the initial Request.url.  We now use the final Response.url instead, though, and Response.url strips the fragment.  This breaks the CSS matching against this SVG element.

I think we need to expose the fragment on Response.url to fix this properly.  An alternative would be to try to backdoor the fragment through a private field here, but its not quiet as nice.

Does it look like we could expose the fragment on Response.url in the future?

-- 
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-365373835

Received on Tuesday, 13 February 2018 20:29:49 UTC