]> granicus.if.org Git - apache/commitdiff
* modules/ssl/ssl_engine_kernel.c (ssl_hook_Fixup): Don't send Upgrade
authorJoe Orton <jorton@apache.org>
Tue, 6 Nov 2007 15:34:35 +0000 (15:34 +0000)
committerJoe Orton <jorton@apache.org>
Tue, 6 Nov 2007 15:34:35 +0000 (15:34 +0000)
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

modules/ssl/ssl_engine_kernel.c

index 58757cc132aa1194082b81eb383af9c5e9ef1e9a..5da75c1c98013a29bcb2fad3d13a5c22d5f290df 100644 (file)
@@ -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");
     }
 
     /*