]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
apps: use else if when checking for headers in the http server code
authorPauli <pauli@openssl.org>
Mon, 17 May 2021 08:16:28 +0000 (18:16 +1000)
committerPauli <pauli@openssl.org>
Tue, 18 May 2021 03:24:41 +0000 (13:24 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/15300)

apps/lib/http_server.c

index 0fbf991388fb0389752ce7e849d0a1c35c05db21..e7e84fa4c58156be573af8ceadfab69b458eefbd 100644 (file)
@@ -457,7 +457,7 @@ int http_server_get_asn1_req(const ASN1_ITEM *it, ASN1_VALUE **preq,
         if (found_keep_alive != NULL && strcasecmp(key, "Connection") == 0) {
             if (strcasecmp(value, "keep-alive") == 0)
                 *found_keep_alive = 1;
-            if (strcasecmp(value, "close") == 0)
+            else if (strcasecmp(value, "close") == 0)
                 *found_keep_alive = 0;
         }
     }