Revert r1865944 and r1865938 in order to provide a better patch with less
locking and thus contention.
lognos
PR63503: fix pool concurrency problems in mod_proxy
reslist and resolver related calls could concurrently access the same pool.
Submitted By: Don Poitras <Don.Poitras sas.com>
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1868294 13f79535-47bb-0310-9956-ffa450edef68
followup to r1852442 which appears to have been too agressive in wrapping
blocks with #if APR_HAS_THREADS. With !APR_HAS_THREADS a global mutex
is a proc mutex.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1866145 13f79535-47bb-0310-9956-ffa450edef68
reslist and resolver related calls could concurrently access the same pool.
Submitted By: Don Poitras <Don.Poitras sas.com>
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1865938 13f79535-47bb-0310-9956-ffa450edef68
we have NOT used it AND the env variable was set. But if we have not
used it we should forward it in any case independent of the env variable
setting.
This aligns also with the behaviour in ap_proxy_create_hdrbrgd.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1859713 13f79535-47bb-0310-9956-ffa450edef68
This function now now handles SSL reuse as well as the "proxy-request-hostname"
note (SNI), so let's also call it unconditionnaly in all proxy modules.
On the mod_ssl side, since this note has the lifetime of the connection, don't
reset/unset it during handshake (ssl_io_filter_handshake).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1859422 13f79535-47bb-0310-9956-ffa450edef68
The SSL dir config of proxy/backend connections is stored in r->per_dir_config
but those connections have a lifetime independent of the requests they handle.
So we need to allow the external ssl_engine_set() function to reset mod_ssl's
dir config in between proxy requests, or the first sslconn->dc could be used
after free for the next requests.
mod_proxy can then reset/reinit the request config when recycling its backend
connections.
PR 63256.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1855646 13f79535-47bb-0310-9956-ffa450edef68
When mod_proxy_http handles end-to-end "100 continue", it can't let
ap_http_filter() send its own interim response whenever the body is read.
So save/restore r->expecting_100 before/after handling the request, and use
req->expecting_100 internally (including to restore r->expecting appropriately).
While at it, add comments and debug logs about 100 continue handling, and
fill in missing APLOGNO()s from r1836588.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1836648 13f79535-47bb-0310-9956-ffa450edef68
function at the same time. So rename ap_proxy_balancer_get_best_worker to
proxy_balancer_get_best_worker and make it static which is then used as an
optional function and recreate ap_proxy_balancer_get_best_worker as an
exported thin wrapper of proxy_balancer_get_best_worker.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1836603 13f79535-47bb-0310-9956-ffa450edef68
This could happen if the header field has something like 'fakepath=foo;path=bar". In this case fakepath would be updated instead of path.
We don't need regex anymore in order to parse the field values and 'ap_proxy_strmatch_domain' and 'ap_proxy_strmatch_path' are now useless. (and should be axed IMHO)
PR 61560
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1832280 13f79535-47bb-0310-9956-ffa450edef68
used as drop-in replacements for unusable workers in the same load balancer set. This differs
from hot standbys which are only used when all workers in a set are unusable. PR 61140.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1828890 13f79535-47bb-0310-9956-ffa450edef68
Does r1822878's "static" APR_RETRIEVE_OPTIONAL_FN work if, say, mod_proxy is
builtin but mod_http2 isn't?
Not worth taking the risk here since it's not a fast path...
Note: if this is an issue, I'm afraid it applies elsewhere too.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822879 13f79535-47bb-0310-9956-ffa450edef68
Get the help(er) of mod_http2 to determine how much connections should
be handled in the reslist by default (i.e. max_threads).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822878 13f79535-47bb-0310-9956-ffa450edef68
When connection_destructor() is called after pchild is gone, we can't
dereference worker->cp anymore. This happens is debug/one_process mode only,
if we exit by calling apr_terminate() or clearing the process pool directly.
Fix this by NULL-ing worker->cp in conn_pool_cleanup(), and by registering it
as a pre_cleanup.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822531 13f79535-47bb-0310-9956-ffa450edef68
backend connection, happening with LogLevel trace2 or higher configured,
or at any log level with compilers not detected as C99 compliant (e.g.
MSVC on Windows).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1775775 13f79535-47bb-0310-9956-ffa450edef68
Export [ap_]check_pipeline() and use it also for ap_proxy_check_connection(),
so that all the necessary checks on the connection are done before reusing it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756186 13f79535-47bb-0310-9956-ffa450edef68
Restore PROXY_WORKER_IS_USABLE() check in ap_proxy_connect_backend(), we must
obviously (un)put backend in error state based on the result of the actual
connect(), and don't change it in ap_proxy_check_backend()...
APR_SUCCESS return by ap_proxy_check_backend(), i.e. a usable worker and an
established connection, is enough for modules to continue w/o calling
ap_proxy_connect_backend(), still.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750508 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
s/is_socket_connected/get_socket_connected/ in the !USE_ALTERNATE_IS_CONNECTED
case, and add CHANGE + MMN entries.
[Reverted by r1750376]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750305 13f79535-47bb-0310-9956-ffa450edef68