]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1903167 from trunk:
authorEric Covener <covener@apache.org>
Tue, 29 Nov 2022 13:21:06 +0000 (13:21 +0000)
committerEric Covener <covener@apache.org>
Tue, 29 Nov 2022 13:21:06 +0000 (13:21 +0000)
  *) mod_ssl: fix for PR66190.

Submitted by: icing
Reviewed by: icing, rpluem, ylavic

Github: closes #326

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1905607 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/ssl/mod_ssl.c
test/modules/proxy/test_01_http.py

diff --git a/CHANGES b/CHANGES
index f9fad4b1d8984b965e4f50a916046da8032adc78..282f3bae76704c18091499cde8ae8d9ee3392e97 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,12 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.55
 
+  *) mod_ssl: when a proxy connection had handled a request using SSL, an
+     error was logged when "SSLProxyEngine" was only configured in the
+     location/proxy section and not the overall server. The connection
+     continued to work, the error log was in error. Fixed PR66190.
+     [Stefan Eissing]
+
   *) mod_http2: Export mod_http2.h as public header. [Stefan Eissing]
 
   *) mod_md: a new directive `MDStoreLocks` can be used on cluster
index 049578f9c5fc04d8c581bb469b6802715124f5b8..5b8c4d5326b2af3e9ee790a5a506f172d3f1d37c 100644 (file)
@@ -548,6 +548,13 @@ static int ssl_hook_ssl_bind_outgoing(conn_rec *c,
     int status;
 
     sslconn = ssl_init_connection_ctx(c, per_dir_config, 1);
+    if (sslconn->ssl) {
+        /* we are already bound to this connection. We have rebound
+         * or removed the reference to a previous per_dir_config,
+         * there is nothing more to do. */
+        return OK;
+    }
+
     status = ssl_engine_status(c, sslconn);
     if (enable_ssl) {
         if (status != OK) {
index 1b79855d15a6bdfa385d4aacdd8a56c18ca300f8..776356524205708fa22bca368dee1b97e3642527 100644 (file)
@@ -71,7 +71,6 @@ class TestProxyHttp:
         assert r.response["status"] == 200
         assert r.json['host'] == seen
 
-    @pytest.mark.skip(reason="needs backport of r1903167")
     def test_proxy_01_003(self, env):
         domain = f"test1.{env.http_tld}"
         conf = HttpdConf(env)