Re: [whatwg/fetch] Stop censoring fragments (#696)

I updated this PR so Fetch handles fragment propagation for all redirects. This also handles the HTML navigation case.

I'm wondering if we want to do what you proposed above, whereby a request can forward its fragment to a response without a redirect:

* This will always happen for synthetic responses as they do not have a URL list of their own so they will get the URL list of the request.
* It currently does not happen when a service worker returns something like `fetch("test")` to a request for `hi#test`. I.e., the resulting URL is not defined to be `test#test`, it's defined to be `test`.

@wanderview proposes above that for the second case we apply the same kind of forwarding. If response's URL's fragment is null, then set it to request's current URL's fragment.

If we do that it should probably happen inside Fetch after "handle fetch" so it's clear it doesn't affect any `Response` objects in a service worker. However, should we be doing that? It's not really a redirect.

-- 
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/pull/696#issuecomment-416555469

Received on Tuesday, 28 August 2018 11:50:43 UTC