httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: [users@httpd] how to set apache authentication time out
Date Thu, 29 Aug 2002 08:01:56 GMT
>From: lzx [mailto:lzx@netchina.com.cn]
>
>I created a CGI to check if user has been time out,
>but another problem, can I compel apache to return 401
>code in my CGI program?

I see what your getting at and it's quite clever... Are you writing your CGI in perl with
the CGI.pm module? If so, you can send header information like this:

use CGI;
my $q = new CGI;
print $q->header("-status" => "401 Unauthorized",
                 "-type"   => "text/plain",
	           "-WWW-Authenticate => "your_realm_description_here");
 
Otherwise, you'll have to figure out the header scheme manually.

Rgds,

Owen Boyle

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message