From: Doug MacEachern Date: Sun, 7 Apr 2002 03:37:35 +0000 (+0000) Subject: fix ProxyPass when frontend is https and backend is http X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=181920ee81a7d567e4c3ed6a65bb86ccb08ec412;p=thirdparty%2Fapache%2Fhttpd.git fix ProxyPass when frontend is https and backend is http git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@94515 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/mod_ssl.c b/mod_ssl.c index 1bf3fa949b3..c1a0c271635 100644 --- 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 = { diff --git a/mod_ssl.h b/mod_ssl.h index 6388164b7ae..558ef7f7ae6 100644 --- 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 *);