From: Joe Orton Date: Tue, 6 Nov 2007 15:34:35 +0000 (+0000) Subject: * modules/ssl/ssl_engine_kernel.c (ssl_hook_Fixup): Don't send Upgrade X-Git-Tag: 2.3.0~1286 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=264f7c6b7390984538f74aba391883c00a05770e;p=apache * modules/ssl/ssl_engine_kernel.c (ssl_hook_Fixup): Don't send Upgrade for a subrequest. When it *is* sent, list it in a Connection: header as required by 2616. PR: 32486 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@592457 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c index 58757cc132..5da75c1c98 100644 --- a/modules/ssl/ssl_engine_kernel.c +++ b/modules/ssl/ssl_engine_kernel.c @@ -1070,8 +1070,13 @@ int ssl_hook_Fixup(request_rec *r) SSL *ssl; int i; - if (sc->enabled == SSL_ENABLED_OPTIONAL && !(sslconn && sslconn->ssl)) { + /* If "SSLEngine optional" is configured, this is not an SSL + * connection, and this isn't a subrequest, send an Upgrade + * response header. */ + if (sc->enabled == SSL_ENABLED_OPTIONAL && !(sslconn && sslconn->ssl) + && !r->main) { apr_table_setn(r->headers_out, "Upgrade", "TLS/1.0, HTTP/1.1"); + apr_table_mergen(r->headers_out, "Connection", "upgrade"); } /*