At 10:07 AM 10/30/00 +0000, Greg Cope wrote:
>Gunther Birznieks wrote:
>> This is an issue if your index.html requires the session id. So if you
>> direct to / you'll lose it. It's not bad if index.html is static, but it
>> could be generated via a handler or perhaps it's an index.cgi
>
>This should work (i think I test this case - cant remember) with just
>'/' as it just adds the '/' on - i,e you keep the session ID.
>
>My brain is stuck on the implications of this at the mo - I cannot see
>the "issue". The behavour appears wrong as the redirect is not right,
>yet it seems to come out in the wash .....
>
>Any ideas on what needs to be done - Gunther ? Bill ?
Hi Greg,
Sorry I haven't had a lot of time to think about it.
Again, my recommendation would be to not try and match against file names
in the PerlTransHandler, and rather split up the code to work in different
phases of the request.
Like in the Eagle book, you might use a trans handler to strip the session
off anything, but add the session later in the request. That way you can
use httpd.conf <location>, <directory>, and <files> sections to control
what gets a session added. But that's what I did in Apache::AuthCookieURL
and I'm having a hard time thinking out of the 'box' before my coffee.
Maybe fine tuning is all you need.
There might also be mod_rewrite or other trans modules that end up
requesting a different file name, so you have to consider if you want your
modules to look at the original request, or after it's been rewritten by
something like mod_rewrite.
Of course, DirectoryIndex can still be a problem since it's handled in a
subrequest. So maybe working only if $r->is_initial_req is true is an
issue, too.
GET /index.html HTTP/1.0
[Mon Oct 30 07:23:43 2000] [error] Initial:1 PerlTransHandler /index.html
[Mon Oct 30 07:23:43 2000] [error] Initial:1 PerlAccessHandler /index.html
[Mon Oct 30 07:23:43 2000] [error] Initial:1 PerlFixupHandler /index.html
GET / HTTP/1.0
[Mon Oct 30 07:24:32 2000] [error] Initial:1 PerlTransHandler /
[Mon Oct 30 07:24:32 2000] [error] Initial:1 PerlAccessHandler /
[Mon Oct 30 07:24:32 2000] [error] Initial:1 PerlFixupHandler /
[Mon Oct 30 07:24:32 2000] [error] Initial:0 PerlTransHandler /index.html
[Mon Oct 30 07:24:32 2000] [error] Initial:0 PerlAccessHandler /index.html
[Mon Oct 30 07:24:32 2000] [error] Initial:0 PerlFixupHandler /index.html
[Mon Oct 30 07:24:32 2000] [error] Initial:0 PerlTransHandler /index.html
[Mon Oct 30 07:24:32 2000] [error] Initial:0 PerlAccessHandler /index.html
[Mon Oct 30 07:24:32 2000] [error] Initial:0 PerlFixupHandler /index.html
Hey Apache! Why the extra set of sub requests???
Bill Moseley
mailto:[EMAIL PROTECTED]