in reply to Re: Logoff/ReLogin to htaccess in one browser
in thread Logoff/ReLogin to htaccess in one browser

Good idea, hatter. But how would you do that? How would you force a 401? Can you do it by writing to the HTTP header directly? I'd love to see some code.

LAI
:eof

Replies are listed 'Best First'.
Re: Re: Forcing Apache to spit out a 401
by rattusillegitimus (Friar) on Jul 10, 2002 at 14:01 UTC

    With CGI.pm, you ought to be able to do something like this untested code:

    use CGI $q = new CGI; print $q->header(-status=>'401 Authorization required'); # add code here to print the rest of the error document
    __________
    He seemed like such a nice guy to his neighbors / Kept to himself and never bothered them with favors
    - Jefferson Airplane, "Assassin"
Re: Re: Forcing Apache to spit out a 401
by fglock (Vicar) on Jul 10, 2002 at 13:42 UTC

    A link like this might do the job:

    <a href="http://invalid:user@www.site.com/cgi-bin/page.cgi">logout</a>