On 7/9/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote:

On 09/07/07, Ravi L <[EMAIL PROTECTED]> 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).


Right. But it would be nice to know if there is a specific reason for Apache
httpd stripping off the headers as in the above case. As I understand, RFC
2616(Section 10.3.5) does not say anything about this.
Could someone please throw some light on this?


thanks
ravi

Graham

Reply via email to