This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15417 - Redirects and the base URL
Summary: Redirects and the base URL
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: XHR (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
: 23361 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-04 14:37 UTC by Anne
Modified: 2014-02-07 16:16 UTC (History)
6 users (show)

See Also:


Attachments

Description Anne 2012-01-04 14:37:45 UTC
We should be clear about what responseXML's Document's object associated URL needs to be.

See: http://lists.w3.org/Archives/Public/public-webapps/2010OctDec/0241.html
Comment 1 Anne 2012-02-06 17:07:12 UTC
This is clear now. But maybe we should also expose something like responseURL in case there is no document, but you want to resolve relative URLs in say, JSON?
Comment 2 Anne 2012-02-06 17:07:48 UTC
Document's URL was defined in http://dvcs.w3.org/hg/xhr/rev/ca4c13d638f9
Comment 3 Hallvord R. M. Steen 2013-05-16 08:46:42 UTC
> maybe we should also expose something like responseURL in case
> there is no document, but you want to resolve relative URLs in say, JSON?

-1 - it does not feel "natural" to me to resolve URLs that are not in a "document" according to the resource's URL.

(On the other hand, I've often wanted something like an xhr.requestURL property for debugging..sometimes while stepping through code one might come across an XHR object reference and need to know what URL it was used for. There are workarounds, but they are clunky.)
Comment 4 Anne 2013-05-16 11:41:33 UTC
You mean like in a cache manifest? Of course it's natural.
Comment 5 Hallvord R. M. Steen 2013-05-16 12:54:38 UTC
Hm.. I guess you're right, also matches resolution of relative URLs in CSS. A responseURL property seems like a good idea.
Comment 6 Anne 2013-09-26 12:49:51 UTC
*** Bug 23361 has been marked as a duplicate of this bug. ***
Comment 7 Julian Reschke 2014-02-03 18:15:37 UTC
I think it should also at least include the redirect status code plus the final request method (because of the "occasional" rewriting to GET).
Comment 8 Anne 2014-02-07 16:16:47 UTC
That doesn't seem like sufficient reason, but it's also out of scope of this bug.

https://github.com/whatwg/xhr/commit/0c9670185b79c255211881e086e05e7a99e65f06