From nobody Mon Feb 9 22:38:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+87287+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87287+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1646417807; cv=none; d=zohomail.com; s=zohoarc; b=XX6hBOIOlf1wBlEIItAL5rOJKX4XGTWmg7YLS2u2NmeRC7y/qsEJdfGVmA7AcVsk5xgKFNu9KCR5eK9fxczNNqWvRCYOs50Y7+k0h1Rtex7CjJ5oTnHZSJY0ocZijKd/fJxcqOc7td8i4vLL8O+q9l34xKHhwpYiB1t9tir2sjM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646417807; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=BqUrDmX0ROgXq65iSWJQlcNpkTdJUzEtcpaUZvQgoF8=; b=J1Yc29x+qCSde41DT00mh/ndJOHrGM5A75riElxzqadiwaa1m0nE7l9TzJk+H380K/XANW2JvV3tfk4lztf4FcJRc8M6gz3vlvM6ac0APzbt4nH1W9PYXTp4SKRVt+cLPXc1tYLehxKCcJdU4Tvxs/sT1BIQ11zxKMwPMyk4xig= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87287+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 164641780760848.201950123208235; Fri, 4 Mar 2022 10:16:47 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id L0T1YY1788612x2KdWbxFCuN; Fri, 04 Mar 2022 10:16:47 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web09.6907.1646400932093587597 for ; Fri, 04 Mar 2022 05:35:32 -0800 X-Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-586-LSEgup6KNy6Ok_UDfPvPKw-1; Fri, 04 Mar 2022 08:35:30 -0500 X-MC-Unique: LSEgup6KNy6Ok_UDfPvPKw-1 X-Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 28BA9824FA7 for ; Fri, 4 Mar 2022 13:35:28 +0000 (UTC) X-Received: from osteffen-laptop.redhat.com (unknown [10.39.194.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 76EF27B5F1; Fri, 4 Mar 2022 13:35:27 +0000 (UTC) From: "Oliver Steffen" To: devel@edk2.groups.io Cc: Oliver Steffen Subject: [edk2-devel] [PATCH 4/4] NetworkPkg/HttpDxe: Detect non-HTTP/1.1 servers Date: Fri, 4 Mar 2022 14:34:31 +0100 Message-Id: <20220304133431.53378-5-osteffen@redhat.com> In-Reply-To: <20220304133431.53378-1-osteffen@redhat.com> References: <20220304133431.53378-1-osteffen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,osteffen@redhat.com X-Gm-Message-State: SFM5kvwrmzlhFn6QbztFQJSvx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1646417807; bh=IickvFs+xKXpPJVfPSMZ9+gD0FxucYv7ktiNUZRM06Y=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=G0okBADLPyD1xHhx7TAgla5hkjIBcKPHM54XFUJh85qD2OhqtsMSbPPhujvhmJWniUQ bE/Klqn+omP9CfwYtOC2nuf+PEAssE2sbO2Iyej7ZJJ92BAzO6LdhrNj4bDTc5rtQ3M8N E/pavfsXINnb+QmKLv13lU1+7I6ddQi2Z6s= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1646418710497100001 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2720 Force connecton close before the next request if the server does not identify as version 1.1. Signed-off-by: Oliver Steffen --- NetworkPkg/HttpDxe/HttpImpl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index a1a3eea585..ea1ab60517 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -1105,6 +1105,14 @@ HttpResponseWorker ( HttpInstance->CacheLen =3D BodyLen; } =20 + // + // Check server's HTTP version. + // + if (AsciiStrnCmp (HttpHeaders, HTTP_VERSION, AsciiStrLen (HTTP_VERSION= )) !=3D 0) { + DEBUG ((DEBUG_WARN, "HTTP: Server version is not 1.1. Setting Connec= tion close.\n")); + HttpInstance->ConnectionClose =3D TRUE; + } + // // Search for Status Code. // --=20 2.35.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87287): https://edk2.groups.io/g/devel/message/87287 Mute This Topic: https://groups.io/mt/89555131/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-