|
Posted by Alan J. Flavell on 09/26/06 17:11
On Tue, 26 Sep 2006, Jonathan N. Little wrote:
> Alan J. Flavell wrote:
> > URLs are by definition case-sensitive, and that's got nothing to
> > do with the particular file system used on any specific server.
> I would argue that you are incorrect. URLs are not *always* case-sensitive
As you have pointed out, the host name part is not case-sensitive,
that's true.
> and case-sensitivity *is* platform dependent.
No, that's wrong.
> Domain names are host names and are
> *not* case-sensitive yet a domain names can be a valid URL so:
>
> http://www.example.com
> http://WWW.EXAMPLE.COM
> http://wWw.eXaMpLe.cOm
>
> are all valid and equivalent URLs regardless of the server platform
Accepted, but this is a distraction from the important point...
> Where the trouble lies is with the path and file name part of the
> URL and as the w3.org states: "URLs in general are case-sensitive
> (with the exception of machine names)."
Fine by me.
> http://www.w3.org/TR/WD-html40-970708/htmlweb.html
>
> I have yet to come across a IIS that won't parse:
>
> http://www.example.com/somepath/somefile.ext
> http://www.example.com/SOMEPATH/SOMEFILE.EXT
> http://www.example.com/somepath/somefile.EXT
> http://www.example.com/SOMEpath/somefile.ext
> http://www.example.com/sOmEpAtH/sOmEfIlE.eXt
>
> as equivalent so I would argue that case-sensitivity is server platform
> dependent.
Those are all different URLs, by definition. If you used them - even
assuming that the web server delivers the same content for all of them
- they would all have to be cached separately by browsers,
intermediate caches, etc.
> I have never installed Apache on Windows, but as with other platform
> independent software like Perl, case does not matter on Windows but
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> will on *nixes.
Again this is wrong as stated. If I'm running e.g a CGI script on my
Win32 Apache, then the script will see the actual URL that was
presented, case and all, and can act accordingly. The distinction
between differently-cased URLs disappears when the typical win32
server maps URLs into the *file system*, it's true, but that's not
because the URLs have magically become case-insensitive, but because
the *file system* is, for these purposes, case-insensitive. The web
doesn't know that, nor care about such internal server details -
that's an important principle: URLs define a hierarchy of their own,
which was designed to be server-agnostic.
And note also what it says in
http://httpd.apache.org/docs/2.2/platform/windows.html#cust
about case-sensitivity in configuration directives for Win32 Apache.
<aside>
One *could* implement a Windows server in such a way that mis-cased
URLs were redirected (301 would be good) to its canonically-cased URL,
from which the resource would then be retrieved. This could relieve
the problem of multiple URLs which all retrieve the same resource.
But at the cost of an additional network transaction for mis-cased
URLs.
</>
Navigation:
[Reply to this message]
|