httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graham Dumpleton" <>
Subject Re: ap_http_header_filter() strips off custom resp headers
Date Mon, 09 Jul 2007 11:21:12 GMT
On 09/07/07, Ravi L <> wrote:
> Hi all,
> Why does Apache httpd strip of the custom response headers when the
> resp-code is "304-Not Modified"?
> I have the following scenario :
> A client sends request to Apache httpd, and the request is handled by some
> module. The module's content handler sets the response status to
> HTTP_NOT_MODIFIED, and adds some custom response headers to "headers_out".
> But, ap_http_header_filter() strips all the headers other than some specific
> headers. Why should it not send the custom headers?

What happens if those headers are add to err_headers_out instead?
Those put in err_headers_out are treated differently in certain cases.
Quoting from httpd.h:

     * The difference between headers_out and err_headers_out is that the
     * latter are printed even on error, and persist across internal redirects
     * (so the headers printed for ErrorDocument handlers will have them).


View raw message