REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2720

Force connecton close before the next request if
the server does not identify as version 1.1.

Signed-off-by: Oliver Steffen <ostef...@redhat.com>
---
 NetworkPkg/HttpDxe/HttpImpl.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index a1a3eea585..ea1ab60517 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -1105,6 +1105,14 @@ HttpResponseWorker (
       HttpInstance->CacheLen = BodyLen;

     }

 

+    //

+    // Check server's HTTP version.

+    //

+    if (AsciiStrnCmp (HttpHeaders, HTTP_VERSION, AsciiStrLen (HTTP_VERSION)) 
!= 0) {

+      DEBUG ((DEBUG_WARN, "HTTP: Server version is not 1.1. Setting Connection 
close.\n"));

+      HttpInstance->ConnectionClose = TRUE;

+    }

+

     //

     // Search for Status Code.

     //

-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#87287): https://edk2.groups.io/g/devel/message/87287
Mute This Topic: https://groups.io/mt/89555131/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to