Hi Apache devs, as follow up of http://svn.apache.org/r1752347 I discovered that simple GET requests with the right If-UnModified-Since header trigger the same problem, namely message-body bytes left unread (and errors logged incorrectly) due to HTTP_PRECONDITION_FAILURE not handled. The 412 in this use case is returned by ap_meets_conditions, called via ap_scan_script_header_err_brigade_ex.
Since the EOS bucket is sent anyway if status != OK, I came up with the following patch: Index: modules/proxy/mod_proxy_fcgi.c =================================================================== --- modules/proxy/mod_proxy_fcgi.c (revision 1759650) +++ modules/proxy/mod_proxy_fcgi.c (working copy) @@ -670,7 +670,7 @@ * bogus reads. */ ignore_body = 1; } - else { + else if (status != HTTP_PRECONDITION_FAILED) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01070) "Error parsing script headers"); rv = APR_EINVAL; I am still confused if this is the right approach or not, more specifically: 1) Do we need to return a message-body in this use case? Maybe handling HTTP_PRECONDITION_FAILURE before the EOS bucket is sent? 2) Should the HTTP_PRECONDITION_FAILED case be coupled with HTTP_NOT_MODIFIED (so leveraging the ignore_body = 1) ? IIUC it shouldn't change much.. Thanks! Regards, Luca