W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2013

[Bug 23361] New: Ability to look up the final URL after redirects

From: <bugzilla@jessica.w3.org>
Date: Thu, 26 Sep 2013 02:02:35 +0000
To: public-webapps@w3.org
Message-ID: <bug-23361-2927@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=23361

            Bug ID: 23361
           Summary: Ability to look up the final URL after redirects
           Product: WebAppsWG
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XHR
          Assignee: annevk@annevk.nl
          Reporter: cowwoc@bbs.darktech.org
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-webapps@w3.org

In trying to design a RESTful API, I find myself needing to canonicalize URLs:
http://stackoverflow.com/q/14045287/14731

Given two URLs, X and Y, I'd like to find out whether they reference the same
resource. If the canonical forms of the URLs are identical, then X and Y must
reference the same resource.

The theory goes that when a request is issued against url A, it will redirect
to B that redirects to C and so on ... until it settles at the canonical form
X. In order to look up the canonical form of A, I simply issue an HTTP HEAD or
GET, let redirection occur, and look up the final URL.

Because XMLHttpRequest does not provide a mechanism to look up the final URL
after redirection, I have no way of finding out a resource's canonical URL.

The only known workaround is to add a resource's canonical URL into the
response body or headers, but this hackish (forcing us to embed duplicate data
into the resource state purely to please browsers while other clients do not
need this).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Thursday, 26 September 2013 02:02:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:13 UTC