diff options
author | Oliver Steffen <osteffen@redhat.com> | 2022-03-22 14:30:06 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-04-11 15:12:46 +0000 |
commit | c43ff5188d7e75292ecdee734db64c5b42a7a313 (patch) | |
tree | 79960b62bb4d4a7c33b27b3a9c42265fc6d870fb /NetworkPkg/HttpDxe | |
parent | 3974aa539ee6b0f9e00b9bb73458639384639301 (diff) | |
download | edk2-c43ff5188d7e75292ecdee734db64c5b42a7a313.tar.gz edk2-c43ff5188d7e75292ecdee734db64c5b42a7a313.tar.bz2 edk2-c43ff5188d7e75292ecdee734db64c5b42a7a313.zip |
NetworkPkg/HttpDxe: Add ConnectionClose flag fo HTTP_PROTOCOL
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>
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'NetworkPkg/HttpDxe')
-rw-r--r-- | NetworkPkg/HttpDxe/HttpImpl.c | 6 | ||||
-rw-r--r-- | NetworkPkg/HttpDxe/HttpProto.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index d64cd9e965..d8b014c94f 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.
//
diff --git a/NetworkPkg/HttpDxe/HttpProto.h b/NetworkPkg/HttpDxe/HttpProto.h index 8ed99c7a02..620eb39158 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 {
|