Thanks for this tiny perl-thingie :-) Of course I protected the cgi-bin
by .htaccess as well.

#!/usr/local/bin/perl
 print "Content-type: text/plain\n\n";
 for(keys %ENV){
  print "\$ENV{$_} => $ENV{$_}\n";
 }

Wrote some HTML that calls this script once with METHOD=POST or
with METHOD=GET. Here is the output:

.
.
$ENV{REQUEST_METHOD} => POST
$ENV{REMOTE_HOST} =>
sp.tech.iphh.net
$ENV{HTTP_REFERER} =>
http://noc.iphh.de/test2.html
$ENV{QUERY_STRING} => 
$ENV{HTTP_USER_AGENT}
=> Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)
.
.
and with METHOD=GET
.
.
$ENV{REQUEST_METHOD} => GET
$ENV{REMOTE_HOST} =>
sp.tech.iphh.net
$ENV{REMOTE_USER} => hostmaster-sp
$ENV{HTTP_REFERER} =>
http://noc.iphh.de/test2.html
$ENV{QUERY_STRING} => 
$ENV{HTTP_USER_AGENT}
=> Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)
$ENV{PATH} =>
/sbin:/bin:/usr/sbin:/usr/bin
.
.

The REMOTE_USER variable definitely disappears ... I tried
Apache 1.3.12 on the machine as well but that doesn't change
anything.

Regards,
Sascha


>Yes, its documented, Unless you figure out some new way to populate
>REMOTE_USER *wink*
>
>Edouard Mademba-Sy wrote:
>> 
>> I got the problem. I found in the Apache FAQ that the cgi script has to
>> be protected too,  not only the HTML  form . Then it works both with
>> GET and POST ! Have a look at:
>> http://www.apache.org/docs/misc/FAQ.html#remote-user-var
>> 
>> Hope this help
>> Edouard
>> 
>> ----- Original Message -----
>> From: "Colin Faber" <>
>> To: <[EMAIL PROTECTED]>
>> Sent: Monday, July 24, 2000 12:33 AM
>> Subject: Re: ENV-Variable with Posts...
>> 
>> > They do, if you use htaccess it should populate it every time..
>> >
>> >
>> >
>> > -- Snip --
>> > #!/usr/local/bin/perl
>> > print "Content-type: text/plain\n\n";
>> > for(keys %ENV){
>> >  print "\$ENV{$_} => $ENV{$_}\n";
>> > }
>> > -- Snip --
>> >
>> > "Sascha E. Pollok" wrote:
>> > >
>> > > Dear folks,
>> > >
>> > > I know that this is some apache-specific thingie and not an mod_ssl
>> > > one but I just noticed that and hope that one of you could help
>> > > me with this even though it's off topic.
>> > >
>> > > Why don't perl-scripts get REMOTE_USER from Apache when
>> > > they (the scripts) have been run by METHOD=POST instead
>> > > of METHOD=GET?
>> > >
>> > > Regards,
>> > > Sascha
>> > > ______________________________________________________________________
>> > > Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
>> > > User Support Mailing List                      [EMAIL PROTECTED]
>> > > Automated List Manager                            [EMAIL PROTECTED]
>> > ______________________________________________________________________
>> > Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
>> > User Support Mailing List                      [EMAIL PROTECTED]
>> > Automated List Manager                            [EMAIL PROTECTED]
>> >
>> ______________________________________________________________________
>> Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
>> User Support Mailing List                      [EMAIL PROTECTED]
>> Automated List Manager                            [EMAIL PROTECTED]
>______________________________________________________________________
>Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
>User Support Mailing List                      [EMAIL PROTECTED]
>Automated List Manager                            [EMAIL PROTECTED]
> 
--- 
Sascha E. Pollok 
Internet Port Hamburg 
Technical Staff / Network Operations
Grosse Reichenstrasse 27
D-20457 Hamburg 
Germany 
Tel.�� +49 (0)40 37 49 19-0 
Fax��� +49 (0)40 37 49 19-29 
Email: [EMAIL PROTECTED]
ICQ #38955239

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to