]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
fix ProxyPass when frontend is https and backend is http
authorDoug MacEachern <dougm@apache.org>
Sun, 7 Apr 2002 03:37:35 +0000 (03:37 +0000)
committerDoug MacEachern <dougm@apache.org>
Sun, 7 Apr 2002 03:37:35 +0000 (03:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@94515 13f79535-47bb-0310-9956-ffa450edef68

mod_ssl.c
mod_ssl.h

index 1bf3fa949b337a2aea1e631a17bd8cc350a1e00f..c1a0c27163517b049b692ac44205e676a4bb32b8 100644 (file)
--- a/mod_ssl.c
+++ b/mod_ssl.c
@@ -252,6 +252,24 @@ int ssl_proxy_enable(conn_rec *c)
     }
 
     sslconn->is_proxy = 1;
+    sslconn->disabled = 0;
+
+    return 1;
+}
+
+int ssl_engine_disable(conn_rec *c)
+{
+    SSLSrvConfigRec *sc = mySrvConfig(c->base_server);
+
+    SSLConnRec *sslconn;
+
+    if (!sc->enabled) {
+        return 0;
+    }
+
+    sslconn = ssl_init_connection_ctx(c);
+
+    sslconn->disabled = 1;
 
     return 1;
 }
@@ -279,6 +297,10 @@ static int ssl_hook_pre_connection(conn_rec *c, void *csd)
         sslconn = ssl_init_connection_ctx(c);
     }
 
+    if (sslconn->disabled) {
+        return DECLINED;
+    }
+
     sslconn->log_level = sc->log_level;
 
     /*
@@ -560,6 +582,7 @@ static void ssl_register_hooks(apr_pool_t *p)
     ssl_var_register();
 
     APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable);
+    APR_REGISTER_OPTIONAL_FN(ssl_engine_disable);
 }
 
 module AP_MODULE_DECLARE_DATA ssl_module = {
index 6388164b7aeba68273bc7ace3ecc2e01a669066a..558ef7f7ae6b64e185d71fec8a6830fa431b91e0 100644 (file)
--- a/mod_ssl.h
+++ b/mod_ssl.h
@@ -432,6 +432,7 @@ typedef struct {
     int verify_depth;
     int log_level; /* for avoiding expensive logging */
     int is_proxy;
+    int disabled;
 } SSLConnRec;
 
 #define SSLConnLogApplies(sslconn, level) (sslconn->log_level >= level)
@@ -722,9 +723,12 @@ APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup,
 
 /* Proxy Support */
 int ssl_proxy_enable(conn_rec *c);
+int ssl_engine_disable(conn_rec *c);
 
 APR_DECLARE_OPTIONAL_FN(int, ssl_proxy_enable, (conn_rec *));
 
+APR_DECLARE_OPTIONAL_FN(int, ssl_engine_disable, (conn_rec *));
+
 /*  I/O  */
 void         ssl_io_filter_init(conn_rec *, SSL *);
 void         ssl_io_filter_register(apr_pool_t *);