]> git.sesse.net Git - cubemap/blobdiff - httpinput.cpp
Set Connection: close in outgoing HTTP headers.
[cubemap] / httpinput.cpp
index 457c2160b241709b042ea473ec3a0c8803f3581e..da672edc3689a14cb4707f29f060d9db73183bad 100644 (file)
@@ -200,6 +200,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();
        // Construct the new HTTP header.
        http_header = "HTTP/1.0 200 OK\r\n";
        for (multimap<string, string>::iterator it = parameters.begin();