<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>23361</bug_id>
          
          <creation_ts>2013-09-26 02:02:35 +0000</creation_ts>
          <short_desc>Ability to look up the final URL after redirects</short_desc>
          <delta_ts>2013-09-26 12:49:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>XHR</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>15417</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gili">cowwoc</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>93847</commentid>
    <comment_count>0</comment_count>
    <who name="Gili">cowwoc</who>
    <bug_when>2013-09-26 02:02:35 +0000</bug_when>
    <thetext>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&apos;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&apos;s canonical URL.

The only known workaround is to add a resource&apos;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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93869</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-09-26 12:49:51 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 15417 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>