]> Nishi Git Mirror - libw3.git/commitdiff
closed
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Wed, 17 Jan 2024 12:24:55 +0000 (12:24 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Wed, 17 Jan 2024 12:24:55 +0000 (12:24 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@23 d27a3e52-49c5-7645-884c-6793ebffc270

Library/HTTP.c

index 65e395e6e7fa30a7258519727c2cfffca251f13b..6e7ca02dbfc3b29eabd71102a2c29aee60f1e9bd 100644 (file)
@@ -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]));