On May 17, 2009, at 12:54 PM, Edward Z. Yang wrote:

Hello Roy,

Two months ago a patch was committed to Apache which prevented Apache
from sending content body when forbidden by the HTTP protocol, namely
204 and 304 response.  You vetoed this patch, and said that the patch
applied to the incorrect code and should be put somewhere else.

I was curious to know as to where you thought the patch would be more
appropriately applied.

Where the 204/304 response is generated.  I have not seen any examples
where that isn't already being done.  The core server code is in

http_protocol.c:ap_send_error_response()

    /* We need to special-case the handling of 204 and 304 responses,
     * since they have specific HTTP requirements and do not include a
* message body. Note that being assbackwards here is not an option.
     */
    if (status == HTTP_NOT_MODIFIED) {
        ap_finalize_request_protocol(r);
        return;
    }

    if (status == HTTP_NO_CONTENT) {
        ap_finalize_request_protocol(r);
        return;
    }

Something similar is in the proxy.

If you know of a specific place where we are sending a body with
one of those codes, then please point it out.

....Roy

Reply via email to