[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    mod_perl and Content-Negotiation
From:       Georg.Weber () infineon ! com
Date:       1999-12-28 17:02:50
[Download RAW message or body]

I'm using Apache/1.3.9, mod_perl/1.21, mod_ssl/2.4.9, OpenSSL/0.9.4
with Content Negotiation enabled (mod_negotiation).

My idea was to use this feature for mod_perl-scripts,also.
So I created to scripts for testing:
- test.pl.en
- test.pl.de

The first time I accessed /perl/test.pl I got the output of test.pl.de
(because my favorite Language is "de" ...)
I changed the Language to "en" in my Browser and reloaded the
script. But the output was still from test.pl.de.

It's clear, because the scripts are cached by URI and it was "/perl/test.pl"
for both tries.

I have changed following lines in site/5.00503/lib/ApacheRegistry.pm to 
cache the scripts by absolute filename:

62: # del by georg.weber@infineon.com
63: #my $script_name = $r->path_info ?
64: #    substr($uri, 0, length($uri)-length($r->path_info)) :
65: #	$uri;
66: # ins by georg.weber@infineon.com
67: my $script_name = $filename;

And it seems to work.

And here are the questions:
Is it *nice* what I have made ?
Do You see any troubles (or impacts) with that change ?
Why do You take the URI ?

When I try to compile mod_perl under WinNT I have
problems, because perl seems to include winsock.h
and apache includes winsock2.h and there are several
types and structs conflicts. Do You have any suggestion ?

best regards,
Georg Weber - EZ VI/GR CAD            Infineon Technologies 
Databases, WWW, NT-Administration     Microelectronic Design Centers Austria GmbH
phone: +43 4242 305-6065              Siemensstrasse 2, A-9500 Villach, Austria
fax:   +43 4242 305-6389              http://www.infineon.com/ezmvi
mailto:Georg.Weber@infineon.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic