httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@nueva.pvt.k12.ca.us>
Subject Re: Trouble with Location/SetHandler
Date Thu, 19 Dec 1996 18:46:56 GMT
On Thu, 19 Dec 1996, Doug MacEachern wrote:

> I tried for myself and was stunned, more so when I could do the same with:
> 
> Alias /cgi-bin/ /users/dougm/www/cgi-bin/
> <Location /cgi-bin>
> SetHandler cgi-script
> Options ExecCGI
> </Location>
> 
> GET //cgi-bin/script
> 
> returns source code of a perl script, binary mess for C program.
>
> Is this a bug or broken configuration on my side?

Yes. It actually has nothing to do with Alias. It's the fact that
Apache does not collapse multiple slashes. It fixes ../ and ./, and a
bunch of other things, but it leaves slashes as are, and lets the
filesystem deal with it (Unices are more than happy to). I think this
is because sometimes PATH_INFO segments have URLs in them, and if you
request /redirect.cgi/http://wherver.com/, you don't want that changed
to /redirect.cgi/http:/wherver.com/. Path info isn't diagnosed until
later in the request (in directory_walk(), to be specific), and I
don't know how easy it would be to collapse slashes at that point.

To be certain, though, this is a problem. Certainly you can't be
expected to put in your config file

<Location /cgi-bin>
<Location //cgi-bin>
<Location ///cgi-bin>

And so on. (although you could do <Location ~ "/+cgi-bin">). But I'm
not sure the correct way to deal with this.

Anyone have any ideas?

-- 
________________________________________________________________________
Alexei Kosut <akosut@nueva.pvt.k12.ca.us>      The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/   http://www.apache.org/


Mime
View raw message