Don't try to read past AP_FCGI_END_REQUEST on the backend side, it would be
a response for the next request.
[Reverted by r1755931]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1755930 13f79535-47bb-0310-9956-ffa450edef68
Background: https://bz.apache.org/bugzilla/show_bug.cgi?id=59838
This commit should be an improvement for http://svn.apache.org/r1752347, in which
I tried to resolve a long standing issue with mod_proxy_fcgi: when a FCGI backend
returns a response that will become a HTTP 304, mod_proxy_fcgi forces a break
in the request processing ending up in reading the remaining bytes (for example
the message-body) and trying to intepret them as a FCGI header. This would cause
a error and a weird behavior:
1) HTTP 304 response flushed to the client correctly.
2) HTTP 503 logged in the access_log plus other bogus errors in the error_log.
I tried to separate the behavior when connection reuse is set or not, to eliminate
unnecessary latency in the latter case (which is the default).
I tested the change with and without connection reuse successfully, but feedback is
really welcome. If nobody will have anything against it I'll then proceed to update
my 2.4.x backport proposal.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754732 13f79535-47bb-0310-9956-ffa450edef68
This commit should solve the issue indicated in PR 55415.
Httpd loops while serving a error document if:
1) The error document's content is proxied.
2) ProxyErrorOverride is set.
The solution proposed is to limit the use of ap_die only
to the initial request. I tested the change with very basic
scenarios but I am not sure if I got all the use cases,
feedback is really welcome.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1753167 13f79535-47bb-0310-9956-ffa450edef68
even when the content has not been modified (HTTP 304).
The problem is described in PR 59838. This patch should
avoid bogus reads causing the following issues with
HTTP 304 responses:
- AH01068: Got bogus version X, expected 1
- AH01069: Got bogus rid X, expected 1
- AH01075: Error dispatching request to :
- HTTP 503 logged instead of 304 (even if the external
client gets correctly a 304)
As discussed on IRC the HTTP_PRECONDITION_FAILED use case
should be handled like the HTTP_NOT_MODIFIED one but it will
be done in a separate commit.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1752347 13f79535-47bb-0310-9956-ffa450edef68
remove the query string from r->filename before calculating environment
(SCRIPT_FILENAME) in mod_proxy_fcgi. Before PR59618, php-fpm would
see proxy:fcgi:// and do some of this same stripping.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1751970 13f79535-47bb-0310-9956-ffa450edef68
Avoid double checking the connection in ap_proxy_connect_backend() when
ap_proxy_check_backend() says it is up and good to go.
This can be done by moving the PROXY_WORKER_IS_USABLE() check in
ap_proxy_check_backend(), since it is called by ap_proxy_connect_backend(),
and not calling the latter if the former succeeded (for the modules using it).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750474 13f79535-47bb-0310-9956-ffa450edef68
before the request is sent. PR 57832.
ap_proxy_check_backend() can be used before ap_proxy_connect_backend() to try
to read available data (including from the filters), and is called by
ap_proxy_connect_backend() to check the socket state only (as before, still
relevant after ap_proxy_check_backend() due to filter data which may not have
triggered a real socket operation).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750392 13f79535-47bb-0310-9956-ffa450edef68
"Error dispatching request", when the cause appears to be
the client closing the connection.
PR58118.
Submitted By: Tobias Adolph <adolph lrz.de>
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1724857 13f79535-47bb-0310-9956-ffa450edef68
input filter already did it while reading client's payload.
When an input filter returns AP_FILTER_ERROR, it has already called ap_die()
or at least already responded to the client.
Here we don't want to lose AP_FILTER_ERROR when returning from proxy handlers,
so we use ap_map_http_request_error() to forward any AP_FILTER_ERROR to
ap_die() which knows whether a response needs to be completed or not.
Before this commit, returning an HTTP error code in this case caused a double
response to be generated.
Depends on r1657881 to preserve r->status (for logging) when nothing is to be
done by ap_die() when handling AP_FILTER_ERROR.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1657897 13f79535-47bb-0310-9956-ffa450edef68
Connection reuse has been disabled since r1032345 at the end of
2011.
Attempt to reverse the polarity of the connection reuse doc which
has been wrong for a long time.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1647005 13f79535-47bb-0310-9956-ffa450edef68
Fix a potential crash with response headers' size above 8K.
The code changes to mod_authnz_fcgi keep the handle_headers()
function in sync between the two modules. mod_authnz_fcgi
does not have this issue because it allocated a separate byte
for terminating '\0'.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640036 13f79535-47bb-0310-9956-ffa450edef68
Refactor some lines to keep APLOGNO on the same line as ap_log_error, when applicable.
Split lines longer than 80.
Improve alignment.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1612068 13f79535-47bb-0310-9956-ffa450edef68
that might be set by filters.
The problem occurs when no body bytes were read while reading the
response headers, resulting in an empty brigade being sent down
the filter stack. One particualr filter that mishandles the empty
initial brigade is mod_deflate. It neglects to add to the response
header fields.
PR: 55558
Submitted by: Jim Riggs <jim riggs.me>
Reviewed by: trawick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1585824 13f79535-47bb-0310-9956-ffa450edef68
if we added the default port or not during the canonizing
phase... Baseline the http method (don't add unless the
port provided isn't the default).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542562 13f79535-47bb-0310-9956-ffa450edef68
is reusable as of this point in processing.
mod_proxy_fcgi uses the new API to determine if FCGI_CONN_CLOSE
should be enabled, but that doesn't change existing behavior
since the connection is currently marked for closure elsewhere
in the module.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1526189 13f79535-47bb-0310-9956-ffa450edef68