This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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).
*** This bug has been marked as a duplicate of bug 15417 ***