New issue
Advanced search Search tips

Issue 907123 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 553535
Owner: ----
Closed: Nov 20
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

event.respondWith ignores the URL if the request is resolved by a redirection

Reported by esanz...@gmail.com, Nov 20

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3616.0 Safari/537.36

Steps to reproduce the problem:
1. If web worker invokes `event.respondWith(fetch('https://httpbin.org/redirect-to?url=https://httpbin.org/get'))`
2. Fetch resolves via a redirection and results in a response with the final URL of 'https://httpbin.org/get'.
3. event.respondWith ignores the URL of Fetch and assigns the URL: 'https://httpbin.org/redirect-to?url=https://httpbin.org/get'.

Example: https://esanzgar.github.io/respondWith-issue/
Code: https://github.com/esanzgar/respondWith-issue

What is the expected behavior?
URL of the response should be 'https://httpbin.org/get'. 

What went wrong?
URL of the response is 'https://httpbin.org/redirect-to?url=https://httpbin.org/get'

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 72.0.3616.0  Channel: canary
OS Version: OS X 10.14.1
Flash Version:
 
Mergedinto: 553535
Status: Duplicate (was: Unconfirmed)
Using the Response.url is a feature that was added to the spec after initial implementation.  See bug 553535.

Note, fetch() does extra work to use the correct URL.  So if you can use fetch() instead of XHR, then you will get the correct URL in chrome right now.
Thanks for filing this and for the example/code. I'm tracking this at  issue 915126 .

Sign in to add a comment