processing of error responses (4xx, 5xx) will be altered.
PR: 39245
This is based on a patch submitted by Bart van der Schans <schans hippo.nl>
and tweaked slightly by me based on discussions on dev@ since April 2006.
I think rpleum was the first to mention the 1xx issue.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@527969 13f79535-47bb-0310-9956-ffa450edef68
from the connection pool twice. This causes this connection to be present
in the connection pool twice. Thus it may be used by different threads
at the same time which causes many troubles (segfaults in this case).
Furthermore implement a logic to prevent double releases to the connection
pool if they are triggered by buggy code and log an error message in this
case.
- mod_proxy_http.c: remove double calls to ap_proxy_http_cleanup
- proxy_util.c: Add logic to prevent double releases of a
connection to the connection pool.
PR: 38793
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@394088 13f79535-47bb-0310-9956-ffa450edef68
handle them correctly, because we recreate backend->connection for each
request and thus try to initialize an already existing SSL connection.
Noticed by: Joe Orton
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@379237 13f79535-47bb-0310-9956-ffa450edef68
backend servers. PR38602. [Ruediger Pluem, Jim Jagielski]
Also, document previous patch:
*) Correctly initialize mod_proxy workers, which use a
combination of local and shared datasets. Adjust logging
to better trace usage. PR38403. [Jim Jagielski]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@378032 13f79535-47bb-0310-9956-ffa450edef68
by the http output filter to create the correct connection response headers.
Instead work on a copy of r->headers_in.
PR: 38524
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@377053 13f79535-47bb-0310-9956-ffa450edef68
backend (see also r357461). Furthermore move common code in mod_proxy_http.c
and mod_proxy_ajp.c into a new function (ap_proxy_backend_broke) in
proxy_util.c.
modules/proxy/mod_proxy_ajp.c : Signal broken backend connection for ajp backend
modules/proxy/proxy_util.c : Add ap_proxy_backend_broke
modules/proxy/mod_proxy_http.c: - Use ap_proxy_backend_broke
- Return DONE also if backend broke
modules/proxy/mod_proxy.h : Add declaration of ap_proxy_backend_broke
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@365374 13f79535-47bb-0310-9956-ffa450edef68
then
- Do not cache it.
- Signal the client that something went wrong by closing the connection
and not sending the last-chunk marker if the response was T-E chunked.
server/core_filters.c : Close the connection to the client by setting
c->keepalive to AP_CONN_CLOSE.
modules/http/chunk_filter.c : Do not send last-chunk marker in the case
the backend broke.
modules/proxy/mod_proxy_http.c: Signal that the backend connection broke.
modules/cache/mod_disk_cache.c: Respect r->no_cache for discarding the response
Submitted by: Roy T. Fielding, Jim Jagielski, Ruediger Pluem
Reviewed by: Roy T. Fielding, Jim Jagielski, Ruediger Pluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357461 13f79535-47bb-0310-9956-ffa450edef68
into the proxy handler of mod_proxy.
This patch still sets r->connection->aborted to 1 which is currently
vetoed by Roy. Moving it from the scheme handler to the proxy handler
should ease the reimplementation of this, as the scheme handlers only
needs to return PROXY_BACKEND_BROKEN to signal the above situation to
the proxy handler.
mod_proxy.h: Add define for PROXY_BACKEND_BROKEN
mod_proxy.c: Handle PROXY_BACKEND_BROKEN in proxy handler
mod_proxy_http.c: Sent back PROXY_BACKEND_BROKEN if backend broke
after we sent the headers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@355823 13f79535-47bb-0310-9956-ffa450edef68
exchanging APR_BRIGADE_CONCAT with ap_save_brigade to ensure that
transient buckets get setaside correctly between various iterations of
ap_get_brigade calls.
Reviewed by: Joe Orton, William Rowe, Jim Jagielski, Jeff Trawick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327590 13f79535-47bb-0310-9956-ffa450edef68
be uninitialized. Asserts in non-debug builds are bad things,
anyways, so this is probably more correct. This should fix
-Werror compile warning observed by Joe Orton.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@231046 13f79535-47bb-0310-9956-ffa450edef68
as chunked - and if chunked always send the body termination "0"
chunk header.
Roy's requested change that we always send a body we could read
in full as a C-L request ensures this code wasn't triggered; some
change in the future could again reveal this edge case.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@230718 13f79535-47bb-0310-9956-ffa450edef68
ap_get_brigade or request body processing in every *subrequest*
proxy action. The new code introduced more chaos because we read
the request body irrespective of any bogus header handling bugs.
This requires a goto, and yes, that sucks :) But this is one of those
oddball cases where jumping away makes more sense than tons of indented
code, IMHO. And if you count the number of goto's I've committed to
httpd, you know I avoid them like the plague.
I woulda' suggestd to jorton to take a flying carnal act, except that
each time he points me back to the 2.0 patch, I catch another entirely
bogus choice within the old/new httpd-2.x request body code :)
I've bumped the 2.0 patch to correspond; see
http://people.apache.org/~wrowe/httpd-2.0-proxy-request-4.patch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@219533 13f79535-47bb-0310-9956-ffa450edef68
closes an infinite loop in the most recent version. Init the cl_val
to prevent failure of zero length bodies in the most recent version.
Use 'request body' instead of 'data' to describe any errors.
Finally, loop around ap_get_brigade to grab multiple chunks that still
fall below our MAX_MEM_SPOOL threshold, since the chunk decoding from
the client will pass up just one small chunk per ap_get_brigade call.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@219430 13f79535-47bb-0310-9956-ffa450edef68
stream if it is smaller than MAX_MEM_SPOOL? Do this upfront
before dispatching to a body handler.
This means changing each of the three body pumps to presume
a preexisting input_brigade was already loaded, so turn around
their loop conditions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@219224 13f79535-47bb-0310-9956-ffa450edef68
* pass a chunked body always (no-body requests don't go chunked).
* validate that the C-L counted body length doesn't change.
* follow RFC 2616 for C-L / T-E in the request body C-L / T-E
election logic.
* do not forward HTTP/1.0 requests as HTTP/1.1, unless the admin
configures force-proxy-request-1.1
* conn was illegible, use 2.0's p_conn.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@218978 13f79535-47bb-0310-9956-ffa450edef68
all the mistakes in this code. Fold send_request_body into reindent
to make the pattern clear and skip some extra string handling.
Little functional change, that comes next.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@216156 13f79535-47bb-0310-9956-ffa450edef68
Unsure if apr_strnatcasecmp(conf_ip, uri_ip) was intentional, on the
off chance that the left or right hand ip string happens to contain
leading zeros.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@216111 13f79535-47bb-0310-9956-ffa450edef68
(ap_proxy_http_process_response): When there are only headers and no body,
give the remainder of the output filters a chance by pushing an EOS bucket
through the filter stack.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@159533 13f79535-47bb-0310-9956-ffa450edef68