X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=NetworkPkg%2FHttpDxe%2FHttpImpl.c;fp=NetworkPkg%2FHttpDxe%2FHttpImpl.c;h=4ec2e8f6679505946dbfdd6a5efdb7290daae0da;hp=d8b014c94f3ab6828635dc8435a4c21d9c78016e;hb=753fd319e22c6d900c7c77d025bfc33976534e7f;hpb=c43ff5188d7e75292ecdee734db64c5b42a7a313 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. //