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

* Use the the same hostname for SNI as for the HTTP request when forwarding

to SSL backends.

PR: 53134
Based on a patch from: Michael Weiser <michael weiser.dinsnail.net>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1333969 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ruediger Pluem
2012-05-04 14:02:58 +00:00
parent 4d4bfe26c7
commit 96cc34efbe
2 changed files with 21 additions and 1 deletions

View File

@@ -2237,8 +2237,24 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
* so.
*/
if (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 != 0) && (r->hostname != NULL)) {
ssl_hostname = r->hostname;
}
else {
ssl_hostname = uri->hostname;
}
apr_table_set(backend->connection->notes, "proxy-request-hostname",
uri->hostname);
ssl_hostname);
}
}