From mboxrd@z Thu Jan 1 00:00:00 1970 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.25380.1646654368569036205 for ; Mon, 07 Mar 2022 03:59:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bjb3stys; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646654367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NDIs+R1tYzMTjtMHz7pUFP4fdqSN93z4CiPAgXssLss=; b=bjb3stys90+8rK6tnbwVG9nS04rFjCOTlnvoDmI92937tRILfOmfcptQRDAkEsuF2stY2F 5oTusjkwq424aurlXYz82/wc2BxILbBPyHJhgIATYcphwoYPsbEePrwDAM87qKqNgmDnso HM9EUa/LBP4paPKDw+5OJJeizxGp1JI= 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-639-UutRLTEYMhGstqKh8Ymd1g-1; Mon, 07 Mar 2022 06:59:25 -0500 X-MC-Unique: UutRLTEYMhGstqKh8Ymd1g-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EF0E61091DA0 for ; Mon, 7 Mar 2022 11:59:24 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.99]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AD56984940; Mon, 7 Mar 2022 11:59:24 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C5C9F1800612; Mon, 7 Mar 2022 12:59:22 +0100 (CET) Date: Mon, 7 Mar 2022 12:59:22 +0100 From: "Gerd Hoffmann" To: devel@edk2.groups.io, osteffen@redhat.com Subject: Re: [edk2-devel] [PATCH 3/4] NetworkPkg/HttpDxe: Detect 'Connection: close' header Message-ID: <20220307115922.3jnnx27sffilj24d@sirius.home.kraxel.org> References: <20220304133431.53378-1-osteffen@redhat.com> <20220304133431.53378-4-osteffen@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220304133431.53378-4-osteffen@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Mar 04, 2022 at 02:34:30PM +0100, Oliver Steffen wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2720 > > Force connecton close before the next request if > the server sends the 'Connection: close' header. > > Signed-off-by: Oliver Steffen > --- > NetworkPkg/HttpDxe/HttpImpl.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c > index d8b014c94f..a1a3eea585 100644 > --- a/NetworkPkg/HttpDxe/HttpImpl.c > +++ b/NetworkPkg/HttpDxe/HttpImpl.c > @@ -994,6 +994,7 @@ HttpResponseWorker ( > UINTN HdrLen; > > NET_FRAGMENT Fragment; > > UINT32 TimeoutValue; > > + UINTN index; Should be "Index" (edk2 codestyle). > + if ((AsciiStriCmp ("Connection", HttpMsg->Headers[index].FieldName) == 0) && > > + (AsciiStriCmp ("close", HttpMsg->Headers[index].FieldValue) == 0)) > > + { > > + DEBUG ((DEBUG_WARN, "Http: 'Connection: close' header received.\n")); I'd suggest to use DEBUG_VERBOSE here. Otherwise the patch looks good to me. take care, Gerd