diff options
Diffstat (limited to 'ssl_engine_kernel.c')
-rw-r--r-- | ssl_engine_kernel.c | 64 |
1 files changed, 27 insertions, 37 deletions
diff --git a/ssl_engine_kernel.c b/ssl_engine_kernel.c index 009ad76a7e..e2756dcfd0 100644 --- a/ssl_engine_kernel.c +++ b/ssl_engine_kernel.c @@ -30,6 +30,8 @@ -- Unknown */ #include "ssl_private.h" +static void ssl_configure_env(request_rec *r, SSLConnRec *sslconn); + /* * Post Read Request Handler */ @@ -81,8 +83,31 @@ int ssl_hook_ReadReq(request_rec *r) * Get the SSL connection structure and perform the * delayed interlinking from SSL back to request_rec */ - if ((ssl = sslconn->ssl)) { - SSL_set_app_data2(ssl, r); + ssl = sslconn->ssl; + if (!ssl) { + return DECLINED; + } + SSL_set_app_data2(ssl, r); + + /* + * Log information about incoming HTTPS requests + */ + if (r->server->loglevel >= APLOG_INFO && ap_is_initial_req(r)) { + ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server, + "%s HTTPS request received for child %ld (server %s)", + (r->connection->keepalives <= 0 ? + "Initial (No.1)" : + apr_psprintf(r->pool, "Subsequent (No.%d)", + r->connection->keepalives+1)), + r->connection->id, + ssl_util_vhostid(r->pool, r->server)); + } + + /* SetEnvIf ssl-*-shutdown flags can only be per-server, + * so they won't change across keepalive requests + */ + if (sslconn->shutdown_type == SSL_SHUTDOWN_TYPE_UNSET) { + ssl_configure_env(r, sslconn); } return DECLINED; @@ -126,41 +151,6 @@ static void ssl_configure_env(request_rec *r, SSLConnRec *sslconn) } /* - * URL Translation Handler - */ -int ssl_hook_Translate(request_rec *r) -{ - SSLConnRec *sslconn = myConnConfig(r->connection); - - if (!(sslconn && sslconn->ssl)) { - return DECLINED; - } - - /* - * Log information about incoming HTTPS requests - */ - if (r->server->loglevel >= APLOG_INFO && ap_is_initial_req(r)) { - ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server, - "%s HTTPS request received for child %ld (server %s)", - (r->connection->keepalives <= 0 ? - "Initial (No.1)" : - apr_psprintf(r->pool, "Subsequent (No.%d)", - r->connection->keepalives+1)), - r->connection->id, - ssl_util_vhostid(r->pool, r->server)); - } - - /* SetEnvIf ssl-*-shutdown flags can only be per-server, - * so they won't change across keepalive requests - */ - if (sslconn->shutdown_type == SSL_SHUTDOWN_TYPE_UNSET) { - ssl_configure_env(r, sslconn); - } - - return DECLINED; -} - -/* * Access Handler */ int ssl_hook_Access(request_rec *r) |