From nobody Mon Feb 9 22:03:43 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+87596+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+87596+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1647351765; cv=none; d=zohomail.com; s=zohoarc; b=k+J+K/uuLinodjNUU0r7o2hKsYbdgnxhu839+18X2s0kerrV5FuKdab8WT/xXz/KFBXr1Qj16kUXKwDEBMB24ZiEuvuJHfjHENRkF/xFWr8TLAxUsZPxh0JKBKDXRivQmOUTu1JPBedwuPo0zMNQmIi0q7cck78hL145AN9ne/4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1647351765; 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=/TKDqXLUa1aLgHf7ddzzEuMvyov+u5OgzfGCxljQBBw=; b=EwOQDtYC9PXvbeoIZs6H3q8fM70Mm6QBuigSuWh/xVYtV3MnClRrZ7Ht4UYwMC8U++l3yhqM7GyVRkCwmKZbVWPmqhDCygzeTKzhKndFUs9jDGxwLoEXIEpdOw8pR5QvskAdUYLWN2C4SgKwfV51M8McvYs9Iac3V4M18QNDWA8= 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+87596+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 1647351765704977.4205165215363; Tue, 15 Mar 2022 06:42:45 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id mArBYY1788612xvgQhrI3x2Y; Tue, 15 Mar 2022 06:42:45 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web12.10815.1647351763391584407 for ; Tue, 15 Mar 2022 06:42:43 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-13-55sm2rT8NM2bsAr-1neRBg-1; Tue, 15 Mar 2022 09:42:41 -0400 X-MC-Unique: 55sm2rT8NM2bsAr-1neRBg-1 X-Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2821383DD2B for ; Tue, 15 Mar 2022 13:42:41 +0000 (UTC) X-Received: from osteffen-laptop.fritz.box (unknown [10.39.195.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id A35F84082387; Tue, 15 Mar 2022 13:42:40 +0000 (UTC) From: "Oliver Steffen" To: devel@edk2.groups.io Cc: Oliver Steffen Subject: [edk2-devel] [PATCH v3 5/5] NetworkPkg/HttpDxe: Detect HTTP/1.0 servers Date: Tue, 15 Mar 2022 14:42:29 +0100 Message-Id: <20220315134229.391909-6-osteffen@redhat.com> In-Reply-To: <20220315134229.391909-1-osteffen@redhat.com> References: <20220304130403.47832-1-osteffen@redhat.com> <20220315134229.391909-1-osteffen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 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: u0Yjzp3xeEsbjcWPHIR6fzHdx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1647351765; bh=p3Ltjpf/Dns05gArNm9qTky/W9CqueTUdiGLyrkVfUI=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=dDbdBa2DvAZ145DbZGr36QNuvbvxvV4aV+1iTqEEMysSEImC/sA6cXyuBe0G1sUnFAu Vt7OXNwwjfI1avzuP+HH8EDlyG4K+N8xQdACxEMG2MUGCvnOwNvxgxB+T70WE/eYG1ZHh n8dPCPiU13Dx8mUp8EK5xOcYqHhb/fuMFVk= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1647351766031100002 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2720 Force connection close before the next request if the server identifies as version 1.0. 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 d40d55ac92ad..623e029c606e 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/1.0", AsciiStrLen ("HTTP/1.0")) = =3D=3D 0) { + DEBUG ((DEBUG_VERBOSE, "HTTP: Server version is 1.0. Setting Connect= ion 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 (#87596): https://edk2.groups.io/g/devel/message/87596 Mute This Topic: https://groups.io/mt/89797773/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-