]> git.sesse.net Git - cubemap/blobdiff - httpinput.cpp
Revert "Rewrite the entire internal signal handling/wakeup."
[cubemap] / httpinput.cpp
index 457c2160b241709b042ea473ec3a0c8803f3581e..49501831fa7df2805eead2a172b5dab5d77a3320 100644 (file)
@@ -4,7 +4,6 @@
 #include <netinet/in.h>
 #include <poll.h>
 #include <stdint.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/ioctl.h>
@@ -200,6 +199,11 @@ bool HTTPInput::parse_response(const std::string &request)
                }
        }
 
+       // Set “Connection: close”.
+       // TODO: Make case-insensitive.
+       parameters.erase("Connection");
+       parameters.insert(make_pair("Connection", "close"));
+
        // Construct the new HTTP header.
        http_header = "HTTP/1.0 200 OK\r\n";
        for (multimap<string, string>::iterator it = parameters.begin();