W3C home > Mailing lists > Public > uri@w3.org > February 2003

/./ and /../

From: Tim Bray <tbray@textuality.com>
Date: Tue, 25 Feb 2003 20:58:57 -0800
Message-ID: <3E5C4991.1000506@textuality.com>
To: "Roy T. Fielding" <fielding@apache.org>
Cc: uri@w3.org

Roy T. Fielding wrote:
>>  If I am given the URI http://example.com/a/./b/../c I will always, 
>> 100% of the time, regard that as http://example.com/a/c. I have just 
>> verified that the first two randomly-picked web browsers I picked in 
>> fact do this.  So the assertion that this only applies to the relative 
>> form is, I assert, simply wrong and should be removed.
> 
> I think you need to look more closely at what the browsers are doing.
> They send the /../ and /./ stuff to the server, whereupon an Apache httpd
> will respond with a redirect to the correct URI.

Nope.  Peering deep into my high-powered research lab... I created a 
test file as follows:

  <html>
  <head><title>foo</title></head>
  <body>
  <p>foo <a href="http://example.com/a/./b/../c">foo</a> bar</p></body>
  </html>

I open it, put my mouse over the blue underlined "foo" and observe what 
appears in the status-bar of the browser.  Under OS X, in each of IE, 
Mozilla, and Safari, the status bar shows http://example.com/a/c - and 
I'm pretty sure it doesn't call out to the server to check.  So I stand 
by my claim that deployed software normalizes /./ and /../ regardless of 
whether it's relative or absolute.

Maybe things are different on Windows & linux? -Tim
Received on Tuesday, 25 February 2003 23:58:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:31 GMT