summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NetworkPkg/HttpDxe/HttpImpl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index d8b014c94f..4ec2e8f667 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;
if ((Wrap == NULL) || (Wrap->HttpInstance == NULL)) {
return EFI_INVALID_PARAMETER;
@@ -1200,6 +1201,16 @@ HttpResponseWorker (
FreePool (HttpHeaders);
HttpHeaders = NULL;
+ for (Index = 0; Index < HttpMsg->HeaderCount; ++Index) {
+ if ((AsciiStriCmp ("Connection", HttpMsg->Headers[Index].FieldName) == 0) &&
+ (AsciiStriCmp ("close", HttpMsg->Headers[Index].FieldValue) == 0))
+ {
+ DEBUG ((DEBUG_VERBOSE, "Http: 'Connection: close' header received.\n"));
+ HttpInstance->ConnectionClose = TRUE;
+ break;
+ }
+ }
+
//
// Init message-body parser by header information.
//