You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <Ke...@Golux.Com> on 2002/07/02 21:05:25 UTC

Header fields for canned error pages

[1.3]

H'm.  Suppose we have a globally-scoped

    Header set "X-Foo" "Bar"
    ErrorDocument 404 /cgi-bin/my404

If we request a nonexistent document, we'll get the output from
the 'my404' script, and the 'X-Foo' field will have been added
to the response header.

However, if we *don't* use a custom ErrorDocument but let
http_protocol.c issue the default 404 page, the field is
*not* added to the response header.

Is this a bug?  I'm not sure either way..
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

Re: Header fields for canned error pages

Posted by Thomas Eibner <th...@stderr.net>.
On Tue, Jul 02, 2002 at 03:05:25PM -0400, Rodent of Unusual Size wrote:
> [1.3]
> 
> H'm.  Suppose we have a globally-scoped
> 
>     Header set "X-Foo" "Bar"
>     ErrorDocument 404 /cgi-bin/my404
> 
> If we request a nonexistent document, we'll get the output from
> the 'my404' script, and the 'X-Foo' field will have been added
> to the response header.
> 
> However, if we *don't* use a custom ErrorDocument but let
> http_protocol.c issue the default 404 page, the field is
> *not* added to the response header.
> 
> Is this a bug?  I'm not sure either way..

Isn't it only because the subrequest that serves the error document for
the 404 is a cgi script? Have you tried with a regular file and seen
the same header being set?

-- 
  Thomas Eibner