Sam Tregar wrote:
> Hello all.  Check out this bug:
> 
>      my $r = Apache->request;
>      $r->header_out(Set-Cookie => '...cookie here...' );
>      $r->header_out(Location   => '...url here...');
>      return REDIRECT;
> 
> Now, we all know that second line has to be err_header_out not
> header_out, or Apache will silently ignore the Set-Cookie directive.
> I knew it as soon as I saw it, although I couldn't explain why and
> thus didn't trust my intuition.  I looked through the list archives
> and the guide without finding an explaination that made sense.
> 
> Would anyone mind explaining this to me?

in short, because anything other than 200 is considered an error.  so
REDIRECT (302) forces apache to use the err_headers_out table instead of the
headers_out table.

why does Location work in headers_out, then, you ask?  well, it's an
exception to the rule - see http_protocol.c :)

--Geoff

Reply via email to