On Tue, Aug 2, 2016 at 5:05 PM, Yann Ylavic <ylavic....@gmail.com> wrote: > > So we need to detect whether the 304 is a CGI Status or ours. > It seems that in the former case r->status is 304, whereas in the > latter case this is the local variable 'status' only. > We could possibly set "cgi_status = r->status" in mod_proxy_fcgi and > bail out if anything is read but AP_FCGI_END_REQUEST when cgi_status > == [23]04. > Otherwise let ignore_body suck up the response body (if any) so that > the connection can be reused if all goes well until the next request.
Actually, unless we want to check/enforce that a Status 304 (as opposed to a 304 set by ap_meets_conditions) is not followed by a body, the correct behaviour is probably just to revert this commit (r1754732). We already ignore the body (when we ought to) until AP_FCGI_END_REQUEST, and I see no reason to close the connection underneath the backend if we turn a 200 to a 304, this connection can even be reused if all goes well. Enforcing that Status 204/304 has no body is not part of this bugfix I guess...