New issue
Advanced search Search tips
Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 17
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 2
Type: Bug

Blocking:
issue 553535



Sign in to add a comment
link

Issue 915126: XHR: xhr.responseURL should return the response URL

Reported by falken@chromium.org, Dec 14 Project Member

Issue description

With service workers, the response URL might not be the same as the request URL. The response URL (https://fetch.spec.whatwg.org/#concept-response-url) should be used.

This affects xhr.responseURL and xhr.responseXML.URL (when the XHR response was a Document).

Chrome Status: https://www.chromestatus.com/feature/5676711949631488

Spec notes:
For xhr.responseURL:
"The responseURL attribute must return the empty string if response’s url is null and its serialization with the exclude fragment flag set otherwise."
https://xhr.spec.whatwg.org/#the-responseurl-attribute

For xhr.responseXML.URL:
"Set document’s URL to response’s url."
https://xhr.spec.whatwg.org/#document-response
 

Comment 1 by falken@chromium.org, Jan 16

Status: Started (was: Assigned)

Comment 4 by falken@chromium.org, Jan 17

Labels: Target-73 M-73 OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Mac OS-Windows

Comment 5 by falken@chromium.org, Jan 17

Description: Show this description

Comment 6 by falken@chromium.org, Jan 17

Labels: -Pri-3 Hotlist-Interop Pri-2

Comment 7 by bugdroid1@chromium.org, Jan 17

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9c34e04a9e3f0aae3661d2e63f2e3cfaa6236eda

commit 9c34e04a9e3f0aae3661d2e63f2e3cfaa6236eda
Author: Matt Falkenhagen <falken@chromium.org>
Date: Thu Jan 17 04:34:18 2019

service worker: WPT: Add generated response tests for XHR response URL.

respondWith(new Response()) is a little tricky for response URL so it's
good to have a test for it.

Bug:  915126 
Change-Id: I21fbc654687d467baf14f02c23f4e41d18ac79ab
Reviewed-on: https://chromium-review.googlesource.com/c/1415613
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623577}
[add] https://crrev.com/9c34e04a9e3f0aae3661d2e63f2e3cfaa6236eda/third_party/blink/web_tests/external/wpt/service-workers/service-worker/resources/xhr-response-url-worker.js
[modify] https://crrev.com/9c34e04a9e3f0aae3661d2e63f2e3cfaa6236eda/third_party/blink/web_tests/external/wpt/service-workers/service-worker/xhr-response-url.https-expected.txt
[modify] https://crrev.com/9c34e04a9e3f0aae3661d2e63f2e3cfaa6236eda/third_party/blink/web_tests/external/wpt/service-workers/service-worker/xhr-response-url.https.html

Comment 8 by bugdroid1@chromium.org, Jan 17

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/47e1c4bb479ec3aa5be900e2ff99de165baa31cc

commit 47e1c4bb479ec3aa5be900e2ff99de165baa31cc
Author: Matt Falkenhagen <falken@chromium.org>
Date: Thu Jan 17 05:27:34 2019

xhr: Use the response URL for responseURL and document URL.

Aligns with the spec, see bug.
Chrome Status: https://www.chromestatus.com/feature/5676711949631488

Bug:  915126 
Change-Id: I7d30a902f95a9e34b32eed891d4e2c3fb983dd71
Reviewed-on: https://chromium-review.googlesource.com/c/1415057
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623594}
[modify] https://crrev.com/47e1c4bb479ec3aa5be900e2ff99de165baa31cc/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc
[delete] https://crrev.com/fe6c0d4a09bbda7bc46f0938fcc56b324c83edfe/third_party/blink/web_tests/external/wpt/service-workers/service-worker/xhr-response-url.https-expected.txt

Comment 9 by falken@chromium.org, Jan 17

Status: Fixed (was: Started)

Sign in to add a comment