From: "Oliver Steffen" <osteffen@redhat.com>
To: devel@edk2.groups.io
Cc: Oliver Steffen <osteffen@redhat.com>
Subject: [PATCH v3 3/5] NetworkPkg/HttpDxe: Add ConnectionClose flag fo HTTP_PROTOCOL
Date: Tue, 15 Mar 2022 14:42:27 +0100 [thread overview]
Message-ID: <20220315134229.391909-4-osteffen@redhat.com> (raw)
In-Reply-To: <20220315134229.391909-1-osteffen@redhat.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2720
Add ConnectionClose flag to HTTP_PROTOCOL.
This boolean is FALSE by default. If set to TRUE, a reconfigure
of the Http instance is forced on the next request. The flag
is then reset.
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
---
NetworkPkg/HttpDxe/HttpProto.h | 2 ++
NetworkPkg/HttpDxe/HttpImpl.c | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/NetworkPkg/HttpDxe/HttpProto.h b/NetworkPkg/HttpDxe/HttpProto.h
index 8ed99c7a02d3..620eb3915843 100644
--- a/NetworkPkg/HttpDxe/HttpProto.h
+++ b/NetworkPkg/HttpDxe/HttpProto.h
@@ -194,6 +194,8 @@ typedef struct _HTTP_PROTOCOL {
EFI_TCP6_IO_TOKEN Tcp6TlsRxToken;
EFI_TCP6_RECEIVE_DATA Tcp6TlsRxData;
BOOLEAN TlsIsRxDone;
+
+ BOOLEAN ConnectionClose;
} HTTP_PROTOCOL;
typedef struct {
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index d64cd9e965c0..d8b014c94f3a 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -161,6 +161,7 @@ EfiHttpConfigure (
HttpInstance->HttpVersion = HttpConfigData->HttpVersion;
HttpInstance->TimeOutMillisec = HttpConfigData->TimeOutMillisec;
HttpInstance->LocalAddressIsIPv6 = HttpConfigData->LocalAddressIsIPv6;
+ HttpInstance->ConnectionClose = FALSE;
if (HttpConfigData->LocalAddressIsIPv6) {
CopyMem (
@@ -440,7 +441,8 @@ EfiHttpRequest (
//
ReConfigure = FALSE;
} else {
- if ((HttpInstance->RemotePort == RemotePort) &&
+ if ((HttpInstance->ConnectionClose == FALSE) &&
+ (HttpInstance->RemotePort == RemotePort) &&
(AsciiStrCmp (HttpInstance->RemoteHost, HostName) == 0) &&
(!HttpInstance->UseHttps || (HttpInstance->UseHttps &&
!TlsConfigure &&
@@ -649,6 +651,8 @@ EfiHttpRequest (
}
}
+ HttpInstance->ConnectionClose = FALSE;
+
//
// Transmit the request message.
//
--
2.35.1
next prev parent reply other threads:[~2022-03-15 13:42 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220304130403.47832-1-osteffen@redhat.com>
2022-03-08 13:21 ` [PATCH v2 0/4] Http Fixes Oliver Steffen
2022-03-08 13:21 ` [PATCH v2 1/4] NetworkPkg/HttpDxe: Decofigure Tcp4 before reconfiguring Oliver Steffen
2022-03-09 9:29 ` [edk2-devel] " Gerd Hoffmann
2022-03-08 13:21 ` [PATCH v2 2/4] NetworkPkg/HttpDxe: Add ConnectionClose flag fo HTTP_PROTOCOL Oliver Steffen
2022-03-09 9:31 ` [edk2-devel] " Gerd Hoffmann
2022-03-08 13:21 ` [PATCH v2 3/4] NetworkPkg/HttpDxe: Detect 'Connection: close' header Oliver Steffen
2022-03-09 9:30 ` [edk2-devel] " Gerd Hoffmann
2022-03-08 13:21 ` [PATCH v2 4/4] NetworkPkg/HttpDxe: Detect HTTP/1.0 servers Oliver Steffen
2022-03-09 9:30 ` [edk2-devel] " Gerd Hoffmann
2022-03-15 13:42 ` [PATCH v3 0/5] Http Fixes Oliver Steffen
2022-03-15 13:42 ` [PATCH v3 1/5] NetworkPkg/HttpDxe: Decofigure Tcp4 before reconfiguring Oliver Steffen
2022-03-15 13:42 ` [PATCH v3 2/5] NetworkPkg/HttpDxe: Decofigure Tcp6 " Oliver Steffen
2022-03-15 13:42 ` Oliver Steffen [this message]
2022-03-15 13:42 ` [PATCH v3 4/5] NetworkPkg/HttpDxe: Detect 'Connection: close' header Oliver Steffen
2022-03-15 13:42 ` [PATCH v3 5/5] NetworkPkg/HttpDxe: Detect HTTP/1.0 servers Oliver Steffen
2022-03-16 10:36 ` [edk2-devel] [PATCH v3 0/5] Http Fixes Gerd Hoffmann
2022-03-22 13:30 ` [PATCH v3 0/5] Http Fixes (Take Two) Oliver Steffen
2022-03-22 13:30 ` [PATCH v3 1/5] NetworkPkg/HttpDxe: Decofigure Tcp4 before reconfiguring Oliver Steffen
2022-03-22 13:30 ` [PATCH v3 2/5] NetworkPkg/HttpDxe: Decofigure Tcp6 " Oliver Steffen
2022-03-22 13:30 ` [PATCH v3 3/5] NetworkPkg/HttpDxe: Add ConnectionClose flag fo HTTP_PROTOCOL Oliver Steffen
2022-03-22 13:30 ` [PATCH v3 4/5] NetworkPkg/HttpDxe: Detect 'Connection: close' header Oliver Steffen
2022-03-22 13:30 ` [PATCH v3 5/5] NetworkPkg/HttpDxe: Detect HTTP/1.0 servers Oliver Steffen
2022-03-23 1:19 ` 回复: [edk2-devel] [PATCH v3 0/5] Http Fixes (Take Two) gaoliming
2022-04-07 9:57 ` Gerd Hoffmann
2022-04-07 12:46 ` Maciej Rabeda
2022-04-07 12:55 ` Oliver Steffen
2022-04-08 9:07 ` Maciej Rabeda
2022-04-11 15:24 ` Maciej Rabeda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220315134229.391909-4-osteffen@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox