httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r1333969 - in /httpd/httpd/trunk: CHANGES modules/proxy/mod_proxy_http.c
Date Fri, 04 May 2012 14:02:58 GMT
Author: rpluem
Date: Fri May  4 14:02:58 2012
New Revision: 1333969

URL: http://svn.apache.org/viewvc?rev=1333969&view=rev
Log:
* 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

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/proxy/mod_proxy_http.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1333969&r1=1333968&r2=1333969&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri May  4 14:02:58 2012
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_proxy: Use the the same hostname for SNI as for the HTTP request when
+     forwarding to SSL backends. PR 53134.
+     [Michael Weiser <michael weiser.dinsnail.net>, Ruediger Pluem]
+
   *) mod_ssl: Add support for TLS Next Protocol Negotiation.  PR 52210.
      [Matthew Steele <mdsteele google.com>]
 

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_http.c?rev=1333969&r1=1333968&r2=1333969&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c Fri May  4 14:02:58 2012
@@ -2237,8 +2237,24 @@ static int proxy_http_handler(request_re
              * 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);
             }
         }
 



Mime
View raw message