Apache/CGI: $ENV{'REMOTE_USER'} and POST

Apache/CGI: $ENV{'REMOTE_USER'} and POST

Post by Kai Schaetz » Fri, 23 Apr 1999 04:00:00



If I POST to a CGI script it seems that the above environment variable is not
available (Apache 1.3.1 on Linux, however, have seen this also on older
Apache and BSDI). It's only available if I execute a script directly.

I assume this is not a bug?
So, what's the reason and is there any way to catch it, anyway?

Kai

--

Kai Sch?tzl, Berlin, Germany
IE-Center: http://ie5.de & http://msie.winware.org
ClubWin - Help for Windows Users: http://www.clubwin.com

 
 
 

Apache/CGI: $ENV{'REMOTE_USER'} and POST

Post by Joshua Sliv » Fri, 23 Apr 1999 04:00:00



> If I POST to a CGI script it seems that the above environment variable is not
> available (Apache 1.3.1 on Linux, however, have seen this also on older
> Apache and BSDI). It's only available if I execute a script directly.
> I assume this is not a bug?
> So, what's the reason and is there any way to catch it, anyway?

Are you sure that the cgi itself is protected by basic auth (not just
the html page calling it)?  Also, make sure you are not using
something silly like
<Limit GET>
...
</Limit>
which would obviously not apply to posts.

--
Joshua Slive

http://finance.commerce.ubc.ca/~slive/

 
 
 

Apache/CGI: $ENV{'REMOTE_USER'} and POST

Post by Kurt J. Lanz » Sat, 24 Apr 1999 04:00:00



> If I POST to a CGI script it seems that the above environment variable is not
> available (Apache 1.3.1 on Linux, however, have seen this also on older
> Apache and BSDI). It's only available if I execute a script directly.

> I assume this is not a bug?
> So, what's the reason and is there any way to catch it, anyway?

It has nothing to do with POSTing to your CGI. REMOTE_USER is only set
if your CGI is in a directory which requires Basic Authentication, and
such authentication succeeds (which is the only way your GCI runs).
 
 
 

Apache/CGI: $ENV{'REMOTE_USER'} and POST

Post by Kai Schaetz » Sat, 24 Apr 1999 04:00:00


Quote:> Also, make sure you are not using
> something silly like
> <Limit GET>
> ....
> </Limit>
> which would obviously not apply to posts.

That's it ;-) I left these settings as they were when I took over.
Thanks!

Kai

--

Kai Sch?tzl, Berlin, Germany
IE-Center: http://ie5.de & http://msie.winware.org
ClubWin - Help for Windows Users: http://www.clubwin.com