]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
r1876779 follow-up.
authorChristophe Jaillet <jailletc36@apache.org>
Tue, 21 Apr 2020 10:18:08 +0000 (10:18 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Tue, 21 Apr 2020 10:18:08 +0000 (10:18 +0000)
strcmp returns 0 if strings match, i.e. TLS/1.0 is found.
ap_find_token returns 1 if TLS/1.0 is found.

So the test has to be reversed to keep the same behavior

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876783 13f79535-47bb-0310-9956-ffa450edef68

modules/arch/netware/mod_nw_ssl.c

index ae0ef023088836c2ee60ab9ac6442daefdb879a7..67d0e8c8cd4353d24dee09eaaae5d5601c2e81cc 100644 (file)
@@ -1143,7 +1143,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
 
 #define SWITCH_STATUS_LINE "HTTP/1.1 101 Switching Protocols"
 #define UPGRADE_HEADER "Upgrade: TLS/1.0, HTTP/1.1"
-#define CONNECTION_HEADER "Connection: Upgrade"
+#define CONNECTION_HEADER "Connection: upgrade"
 
 static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
                                           apr_bucket_brigade *bb)
@@ -1178,7 +1178,7 @@ static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
 
     upgrade = apr_table_get(r->headers_in, "Upgrade");
     if (upgrade == NULL
-        || ap_find_token(r->pool, upgrade, "TLS/1.0")) {
+        || !ap_find_token(r->pool, upgrade, "TLS/1.0")) {
             /* "Upgrade: TLS/1.0, ..." header not found, don't do Upgrade */
         return ap_pass_brigade(f->next, bb);
     }