mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Save some cycles...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1516911 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
|
||||
APLOG_USE_MODULE(proxy);
|
||||
|
||||
#define UDS_SOCKET_STRING "uds="
|
||||
/*
|
||||
* Opaque structure containing target server info when
|
||||
* using a forward proxy.
|
||||
@@ -2119,7 +2120,7 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
|
||||
* spilling the cached addr from the worker.
|
||||
*/
|
||||
if (!conn->hostname || !worker->s->is_address_reusable ||
|
||||
worker->s->disablereuse || strncmp(conn->hostname, "socket=", 7) == 0) {
|
||||
worker->s->disablereuse || strncmp(conn->hostname, UDS_SOCKET_STRING, sizeof(UDS_SOCKET_STRING)-1) == 0) {
|
||||
if (proxyname) {
|
||||
conn->hostname = apr_pstrdup(conn->pool, proxyname);
|
||||
conn->port = proxyport;
|
||||
@@ -2157,8 +2158,8 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
|
||||
conn->port = uri->port;
|
||||
}
|
||||
socket_cleanup(conn);
|
||||
if (strncmp(conn->hostname, "socket=", 7) == 0) {
|
||||
char *uds_path = apr_pstrdup(conn->pool, conn->hostname + 7);
|
||||
if (strncmp(conn->hostname, UDS_SOCKET_STRING, sizeof(UDS_SOCKET_STRING)-1) == 0) {
|
||||
char *uds_path = apr_pstrdup(conn->pool, conn->hostname + sizeof(UDS_SOCKET_STRING) - 1);
|
||||
decodeenc(uds_path);
|
||||
conn->uds_path = uds_path;
|
||||
}
|
||||
|
Reference in New Issue
Block a user