[Webkit-unassigned] [Bug 136938] The XMLHttpRequest should suppourt method responseURL As per latest Spec

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 19 10:02:06 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=136938





--- Comment #4 from Alexey Proskuryakov <ap at webkit.org>  2014-09-19 10:02:02 PST ---
(From update of attachment 238368)
View in context: https://bugs.webkit.org/attachment.cgi?id=238368&action=review

responseURL only exists in WhatWG version of XHR spec, <https://xhr.spec.whatwg.org/#the-responseurl-attribute>, and this spec does not appear to be very polished yet. Has it been through any kind of security review? Do other browsers implement this?

The definition of responseURL is: "The responseURL attribute must return the empty string if response's url is null and its serialization otherwise." The definition of response's url is in Fetch spec, <https://fetch.spec.whatwg.org/#concept-response-url>.

But in the Fetch spec, it's defined to always be the request URL, it doesn't change with redirects!

Another thing that I noticed is that the Fetch spec has a concept of Response object and its URL, which filters out fragment identifiers - and XHR spec does not filter them out for responseURL. This is an inconsistency that needs to be resolved.

> LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-responseURL.html:3
> +<script src="../../../../js-test-resources/js-test.js"></script>

The relative path is not needed, can be just "/js-test-resources/js-test.js".

> LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-responseURL.html:14
> +    if (req.readyState == 3) {

We should test responseURL in every state, not just in state 3.

We should test various unusual URLs in Location field, notably:
- ones with fragments;
- ones with user credentials;
- ones that are absolute vs. relative.

> LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-responseURL.html:30
> +<script src="../../../../js-test-resources/js-test.js"></script>

Same comment about path.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list