www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <sl...@apache.org>
Subject RE: general/7232: FilesMatch does not work correctly
Date Mon, 12 Feb 2001 22:24:10 GMT
On Mon, 12 Feb 2001, Thiago Madeira de Lima wrote:

>
> 	Sorry, I can't agree with you.
>
> 	I use the FilesMatch directive send all .htm files to a perl handler.
>
> 	The perl handler include some html in the page.
>
> 	When I request (using lynx/netscape/ie) :
>
> 	www.foo.com/x.htm  I see the page x.htm modified by my banner
>
> 	If I copy the x.htm to "x x.htm" and request www.foo.com/x x.htm I see the
> original x.htm without the banner modifications. So the request is allright,
> I'm seeing what I asked for.
>
> 	Try my sample at : http://paulinha.hpg.com.br/
>
> 	You will see that the file with the space don't show you the banner. And in
> the file system both files are exactly the same.
>
> 	I made some extensive tests with it. Sending enconded and unencoded urls to
> apache, and in both ways I allways get the same result.
>

There are too many variables here to properly diagnose what is going on.
A request for "x x.htm" could easily be interpreted by Apache as a request
for "x" which could (via MutiViews) lead to "x.htm" being served, and
then who knows what your Perl handler would do with that.

To confirm to myself that <FilesMatch> does work with encoded space,
I tried a more simple configuration:

<FilesMatch .*\.htm$>
Deny from all
</FilesMatch>

And that worked fine regardless of whether the request contained an
encoded space or not.  Why don't you try something like, with filenames
"x.htm" and "y y.htm" (requested as "y%20y.htm") and see if it works for
you (ie. it forbids access).

If it does work, then there is likely a problem either with the way you
are calling the Perl handler, or with the Perl handler itself.

Good luck.

Joshua.


Mime
View raw message