From: Bradley Nicholes Date: Wed, 27 Oct 2004 15:14:51 +0000 (+0000) Subject: Add the check for an upgraded https connection when responding to the state of a... X-Git-Tag: 2.1.1~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d68780ff93b1b6e33cfdd92e072eb1ea6ebac202;p=thirdparty%2Fapache%2Fhttpd.git Add the check for an upgraded https connection when responding to the state of a connection git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105606 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/arch/netware/mod_nw_ssl.c b/modules/arch/netware/mod_nw_ssl.c index 060b17b992f..16a76ead6a1 100644 --- a/modules/arch/netware/mod_nw_ssl.c +++ b/modules/arch/netware/mod_nw_ssl.c @@ -789,7 +789,9 @@ int ssl_engine_disable(conn_rec *c) static int ssl_is_https(conn_rec *c) { - return isSecureConn (c->base_server, c); + secsocket_data *csd_data = (secsocket_data*)ap_get_module_config(c->conn_config, &nwssl_module); + + return isSecureConn (c->base_server, c) || (csd_data && csd_data->is_secure); } /* This function must remain safe to use for a non-SSL connection. */ @@ -836,6 +838,12 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, result = apr_table_get(r->headers_in, "Proxy-Connection"); else if (strcEQ(var, "HTTP_ACCEPT")) result = apr_table_get(r->headers_in, "Accept"); + else if (strcEQ(var, "HTTPS")) { + if (isSecure(r) || isSecureUpgraded(r)) + result = "on"; + else + result = "off"; + } else if (strlen(var) > 5 && strcEQn(var, "HTTP:", 5)) /* all other headers from which we are still not know about */ result = apr_table_get(r->headers_in, var+5); @@ -908,12 +916,6 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, result = NULL; else if (strcEQ(var, "REMOTE_ADDR")) result = c->remote_ip; - else if (strcEQ(var, "HTTPS")) { - if (isSecureConn (s, c)) - result = "on"; - else - result = "off"; - } } /*