From a94d62ab23e95630c156d00342ee9c3cf2e59515 Mon Sep 17 00:00:00 2001 From: Pauli Date: Mon, 17 May 2021 18:16:28 +1000 Subject: [PATCH] apps: use else if when checking for headers in the http server code Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/15300) --- apps/lib/http_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/lib/http_server.c b/apps/lib/http_server.c index 0fbf991388f..e7e84fa4c58 100644 --- a/apps/lib/http_server.c +++ b/apps/lib/http_server.c @@ -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; } } -- 2.47.3