httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: redirect in post-read phase
Date Tue, 18 May 1999 16:47:27 GMT
Rodent of Unusual Size <Ken.Coar@Golux.Com> writes:

> Try putting the "Location" field into r->err_headers_out instead
> of r->headers_out.  The contents of the former table are *always*
> sent, but there are conditions under which the latter are not.

Yup. One of the first things I tried. The r->err_headers_out are preserved,
and the r->headers_out are cleared. With one exception. The Location within
r->headers_out is preserved. So I guess it could be done either way. 

>From http_protocol.c:ap_send_error_response

    const char *location = ap_table_get(r->headers_out, "Location");


        table *tmp = r->headers_out;

        /* For all HTTP/1.x responses for which we generate the message,
         * we need to avoid inheriting the "normal status" header fields
         * that may have been set by the request handler before the
         * error or redirect, except for Location on external redirects.
        r->headers_out = r->err_headers_out;
        r->err_headers_out = tmp;

        if (location && *location
            && (ap_is_HTTP_REDIRECT(status) || status == HTTP_CREATED))
            ap_table_setn(r->headers_out, "Location", location);

The problem still remains that ap_rflush is never called.


> -- 
> #ken    P-)}
> Ken Coar                    <http://Web.Golux.Com/coar/>
> Apache Software Foundation  <>
> "Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>

Tom Vaughan <tvaughan at aventail dot com>

View raw message