1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

Revert r1572606 for the time being since backport would conflict with 2.4.x's proxy_conn_rec.

The uds_path field is at the end of the struct in 2.4.x but not in trunk.
Fix that first, then recommit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572627 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yann Ylavic
2014-02-27 15:31:58 +00:00
parent 6a9b7697e5
commit dc560db2e9
3 changed files with 19 additions and 35 deletions

View File

@@ -1405,7 +1405,6 @@ static void socket_cleanup(proxy_conn_rec *conn)
{
conn->sock = NULL;
conn->connection = NULL;
conn->ssl_hostname = NULL;
apr_pool_clear(conn->scpool);
}
@@ -2347,35 +2346,6 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
return ap_proxyerror(r, HTTP_FORBIDDEN,
"Connect to remote machine blocked");
}
/*
* When SSL is configured, determine the hostname (SNI) for the request
* and save it in conn->ssl_hostname. Close any reused connection whose
* SNI differs.
*/
if (conn->is_ssl) {
proxy_dir_conf *dconf;
const char *ssl_hostname;
/*
* In the case of ProxyPreserveHost on use the hostname of
* the request if present otherwise use the one from the
* backend request URI.
*/
dconf = ap_get_module_config(r->per_dir_config, &proxy_module);
if (dconf->preserve_host) {
ssl_hostname = r->hostname;
}
else {
ssl_hostname = conn->hostname;
}
if (conn->ssl_hostname != NULL &&
(!ssl_hostname || strcasecmp(conn->ssl_hostname,
ssl_hostname) != 0)) {
socket_cleanup(conn);
}
if (conn->ssl_hostname == NULL) {
conn->ssl_hostname = apr_pstrdup(conn->scpool, ssl_hostname);
}
}
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00947)
"connected %s to %s:%d", *url, conn->hostname, conn->port);
return OK;