in reply to Re: Re: Re: Need help creating an Apache session logout script with Perl/CGI without the use cookies.
in thread Need help creating an Apache session logout script with Perl/CGI without the use cookies.

So if I'm following sgifford correctly, this should do it:
print "Status: 401\n"; print "Redirect: $0\n";


(the redirect header might not be the exact syntax.. I forget)
  • Comment on Re: Re: Re: Re: Need help creating an Apache session logout script with Perl/CGI without the use cookies.
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Need help creating an Apache session logout script with Perl/CGI without the use cookies.
by sgifford (Prior) on Sep 08, 2003 at 15:12 UTC
    Here's an example of the response and header a Web server might send to an unauthenticated user:
    HTTP/1.1 401 Authorization Required Date: Mon, 08 Sep 2003 15:04:20 GMT Server: Apache/1.3.28 (Unix) WWW-Authenticate: Basic realm="Ford Shared Inventory Login" Connection: close Content-Type: text/html; charset=iso-8859-1
    I don't remember exactly how to do this, but it should just take a little experimentation. You should also consider reading up on HTTP Authentication in the HTTP 1.1 spec at http://w3.org.