Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: [Mason] Sending right header to force http basic authentication

by simonm (Vicar)
on Nov 26, 2005 at 03:51 UTC ( [id://511817]=note: print w/replies, xml ) Need Help??


in reply to [Mason] Sending right header to force http basic authentication

See this section of the Mason documentation.

Perhaps semething like this:

<%perl> $m->autoflush(0); $m->clear_buffer(); $r->header_out->add("WWW-Authenticate" => 'Basic realm="RealmChain"'); $r->send_http_header(); $m->abort("401 Unauthorized"); </%perl>
  • Comment on Re: [Mason] Sending right header to force http basic authentication
  • Download Code

Replies are listed 'Best First'.
Re^2: [Mason] Sending right header to force http basic authentication
by johnnywang (Priest) on Nov 26, 2005 at 20:47 UTC
    This doesn't seem to work. Although abort() forced the correct status (401), it somehow removed the WWW-Authenticate header:
    $r->header_out->add("WWW-Authenticate" => 'Basic realm="RealmChain"'); $r->send_http_header();
      try : $r->err_header_out instead of $r->header_out
        Great ! It just work as I want with err_header !! Thx a lot.

        -- Nice photos of naked perl sources here !

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://511817]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-26 08:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found