From 782eb101699eb181b7cdb19278edec3c6613a8cf Mon Sep 17 00:00:00 2001 From: nishi Date: Wed, 17 Jan 2024 12:24:55 +0000 Subject: [PATCH] closed git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@23 d27a3e52-49c5-7645-884c-6793ebffc270 --- Library/HTTP.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/HTTP.c b/Library/HTTP.c index 65e395e..6e7ca02 100644 --- a/Library/HTTP.c +++ b/Library/HTTP.c @@ -28,9 +28,13 @@ void __W3_HTTP_Request(struct W3* w3){ __W3_Auto_Write(w3, ")", 1); __W3_Auto_Write(w3, "\r\n", 2); } + __W3_Auto_Write(w3, "Connection: ", 12); + __W3_Auto_Write(w3, "closed", 6); + __W3_Auto_Write(w3, "\r\n", 2); if(w3->headers != NULL){ int i; for(i = 0; w3->headers[i] != NULL; i += 2){ + if(strcmp(w3->headers[i], "connection") == 0) continue; __W3_Auto_Write(w3, w3->headers[i], strlen(w3->headers[i])); __W3_Auto_Write(w3, ": ", 2); __W3_Auto_Write(w3, w3->headers[i + 1], strlen(w3->headers[i + 1])); -- 2.43.0