You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Boyle Owen <Ow...@swx.com> on 2005/10/24 09:38:46 UTC

RE: [users@httpd] make URL's case insensitive - (opinion - OT)

> -----Original Message-----
> From: Nick Kew [mailto:nick@webthing.com]
> 
> It is HTTP, the protocol of the Web, that is case-sensitive.
> Anything that tries to pretend it's not is broken.

Exactly.

The whole concept of "case-sensitivity" is wrong-headed to begin with. The case of a letter is an essential part of its semantics and cannot be dispensed with without losing information. 

To give an example, the other night, I was in a restaurant and one of the items on the menu was "Filets de perche d'Orange". In a case-insensitive world, you might expect your fish to come with orange sauce. But there was important information in the capital "O" in "Orange"... As it turns out the restaurant was called the "Hotel D'Orange" and so the menu was telling us that the dish was done in the special style of that hotel (garlic butter, actually). So the case of a single letter changed completely the semantics of the phrase and the taste of the fish.

Filenames and URLs are meant for human consumption and so reflect the underlying semantics of human language (otherwise we'd just use inodes and IP addresses). So if case is important in our written language it must be important on a computer too.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> 
> -- 
> Nick Kew
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
Diese E-mail ist eine private und persönliche Kommunikation. Sie hat keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This e-mail is of a private and personal nature. It is not related to the exchange or business activities of the SWX Group. Le présent e-mail est un message privé et personnel, sans rapport avec l'activité boursière du Groupe SWX.
 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] make URL's case insensitive

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Doug McNutt wrote:
> At 10:44 -0700 10/24/05, dogbert@netnevada.net wrote, in part:
> 
>>. . . as opposed to general case-insensitivity which is
>>not possible (and, in addition, not advisable, since proxy caches,
>>search engines, etc are all case sensitive).
> 
> Well, Google is case INsensitive and proud of it.

Try...

   http://www.google.com/preferences?hl=en
   http://www.google.com/Preferences?hl=en

Query strings have nothing to do with resource paths.

> Think Mac OX neXt. . . I have a local machine named Gallifrey running Linux. 
> I place an entry for it into my /etc/hosts file pointing to 192.168.1.26. 
> Asking Safari to access Apache at http://Gallifrey fails!. 
> The Someone changes the URL to http://gallifrey.  Placing a parallel entry 
> in /etc/hosts named gallifrey fixes it up. The doctor deserves to have his home 
> planet capitalized.

The HOSTNAME is case insensitive.  The resource name is not.  See the respective
RFC's and STD documents.

> It appears that OS neXt converts everything to lower case expecting a DNS 
> server to be case insensitive, as per URL specifications, when its own nslookup 
> fails when looking into a local hosts file.

That's a bug on OS neXt, but is inapplicable to this whole discussion.

Scheme and hostname are case insensitive.  User/Password is application-defined.
Resource is case sensitive.  Query string is application defined.

None of this is germane to the discussion at hand :)

Bill

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] make URL's case insensitive

Posted by Doug McNutt <do...@macnauchtan.com>.
At 10:44 -0700 10/24/05, dogbert@netnevada.net wrote, in part:
> . . . as opposed to general case-insensitivity which is
>not possible (and, in addition, not advisable, since proxy caches,
>search engines, etc are all case sensitive).

Well, Google is case INsensitive and proud of it. I once complained explicitly because of things like the ON in ON Semiconductor or universal use of caps in part numbers for electronics. AD for Analog Devices zB. Their polite answer was, paraphrased a bit,  "get lost, we know what we're doing." Try searching for AND gates.

Think Mac OX neXt. . . I have a local machine named Gallifrey running Linux. I place an entry for it into my /etc/hosts file pointing to 192.168.1.26. Asking Safari to access Apache at http://Gallifrey fails!. The Someone changes the URL to http://gallifrey.  Placing a parallel entry in /etc/hosts named gallifrey fixes it up. The doctor deserves to have his home planet capitalized.

It appears that OS neXt converts everything to lower case expecting a DNS server to be case insensitive, as per URL specifications, when its own nslookup fails when looking into a local hosts file.
-- 

-->  Halloween  == Oct 31 == Dec 25 == Christmas  <--

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] make URL's case insensitive

Posted by do...@netnevada.net.
Quoting Joshua Slive <js...@gmail.com>:

> On 10/24/05, dogbert@netnevada.net <do...@netnevada.net> wrote:
> 
> > RewriteEngine On
> > RewriteMap lc int:tolower
> > RewriteRule (.*) ${lc:$1} [R]
> 
> > However, when I try this in apache (2.0.5x), I get the following message
> > returned to me in firefox 1.0.7:
> >
> > redirection limit for this URL exceeded, unable to load requested page
> 
> Try adding a
> RewriteCond %{Request_URI} [A-Z]
> before the RewriteRule to make sure it only triggers on URLs that have
> some upper-case in them.

That appears to have done the trick...I had MeMBeRs in the URL and it processed 
it normally (I'll be testing this for a week to 10 days before placing it on 
other web servers).  How much CPU overhead would something like this add to the 
web server itself (if you know offhand).

Thanks for the help, btw!

Bill



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] make URL's case insensitive

Posted by Joshua Slive <js...@gmail.com>.
On 10/24/05, dogbert@netnevada.net <do...@netnevada.net> wrote:

> RewriteEngine On
> RewriteMap lc int:tolower
> RewriteRule (.*) ${lc:$1} [R]

> However, when I try this in apache (2.0.5x), I get the following message
> returned to me in firefox 1.0.7:
>
> redirection limit for this URL exceeded, unable to load requested page

Try adding a
RewriteCond %{Request_URI} [A-Z]
before the RewriteRule to make sure it only triggers on URLs that have
some upper-case in them.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] make URL's case insensitive

Posted by Marc Perkel <ma...@perkel.com>.
I've had good luck using mod_speling. But before that I used a trick 
where I used samba. The trick is to run samba, mount a share, then serve 
from that share. Samba is case insensitive.

BTW - I agree - in fact I think it's insane to have a case sensitive 
file system. But I'll never convince the Unix cult of that.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] make URL's case insensitive

Posted by do...@netnevada.net.
Quoting Boyle Owen <Ow...@swx.com>:

> > -----Original Message-----
> > From: Nick Kew [mailto:nick@webthing.com]
> > 
> > It is HTTP, the protocol of the Web, that is case-sensitive.
> > Anything that tries to pretend it's not is broken.
> 
> Exactly.
> 
> The whole concept of "case-sensitivity" is wrong-headed to begin with. The
> case of a letter is an essential part of its semantics and cannot be
> dispensed with without losing information. 
> 
> To give an example, the other night, I was in a restaurant and one of the
> items on the menu was "Filets de perche d'Orange". In a case-insensitive
> world, you might expect your fish to come with orange sauce. But there was
> important information in the capital "O" in "Orange"... As it turns out the
> restaurant was called the "Hotel D'Orange" and so the menu was telling us
> that the dish was done in the special style of that hotel (garlic butter,
> actually). So the case of a single letter changed completely the semantics of
> the phrase and the taste of the fish.
> 
> Filenames and URLs are meant for human consumption and so reflect the
> underlying semantics of human language (otherwise we'd just use inodes and IP
> addresses). So if case is important in our written language it must be
> important on a computer too.

Hmmm, didn't consider this...(gah!)

On a different note, Joshua gave me the following use of mod_rewrite to make 
URL's all lower case:

Well, you just changed your question.  Mapping to all-lowercase is
actually possible, as opposed to general case-insensitivity which is
not possible (and, in addition, not advisable, since proxy caches,
search engines, etc are all case sensitive).

Something like:

RewriteEngine On
RewriteMap lc int:tolower
RewriteRule (.*) ${lc:$1} [R]

(The [R] on the end is not strictly necessary, but is highly
recommended unless you want many variants of your URLs to propogate to
search engines and caches.)

However, when I try this in apache (2.0.5x), I get the following message 
returned to me in firefox 1.0.7:

redirection limit for this URL exceeded, unable to load requested page

It would appear that a infinite rewrite could be happening, but I'm not quite 
sure as to how to solve the problem.

Bill



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org