kris nelson wrote:
Apache/1.3.26 + mod_perl/1.27

I've noticed that Apache alone appears to differ from one of my modules
running under mod_perl in its handling of trailing slashes. I'm wondering if
this is expected behavior and, if so, why? (Maybe this is obvious...)

For example: the file "news.html" exists in "/var/www/html/". I issue four
requests to Apache alone, one for "/news.html", one for "/news", one for
"/news/" and one for "/news.html/", and then the same four requests again,
this time under mod_perl.

The second time, under mod_perl, I use a basic little module that simply
records the value of $r->filename to the error log and then sends the
contents of the file to the browser (after opening it with Apache::File,
similar to the Ch. 4 Eagle book instructions). (No directory called
"/var/www/html//news" exists, nor are there any symlinks involved.)

Here's a table of the results:

Apache
-------
/news.html	/news	/news/	/news.html/
200		200	404	404

200 means success, data displayed was from "news.html". The error log showed
that "/news.html/" was not found in the case of the 404s.

Apache+mod_perl
---------------
/news.html	/news	/news/	/news.html/
200		200	200	200

200 means success, data displayed was from "news.html", error_log recorded
"/var/www/html/news.html" in all cases as the value of $r->filename (thanks
to my little Perl module logging this value for me). In the cases of
"/news/" and "/news.html/", my relative image links broke (for hopefully
obvious reasons).

Is this expected behavior? Why? I would expect Apache and Apache+mod_perl to
behave similarly. Am I missing something obvious? (Probably...)
It's hard to guess what your relevant configuration is. Care to send in the mod_perl and Apache sections? Including things like Multiviews Options, DirectoryIndex, etc.

Basically it all comes to the following logic: mod_perl sections inherit all the default Apache settings unless you've overriden them. And this is true for any other module, be it mod_perl or not.


__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

Reply via email to