]> git.sesse.net Git - cubemap/commitdiff
Set Connection: close in outgoing HTTP headers.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 18 Apr 2013 23:38:36 +0000 (01:38 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 18 Apr 2013 23:38:36 +0000 (01:38 +0200)
httpinput.cpp
udpinput.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();
index 8659141b2ed0e11d8be8e93ae1d0b74c3867da86..4222515e71c58366cc372c9faf33ea8a5b6788f4 100644 (file)
@@ -70,7 +70,8 @@ void UDPInput::construct_header()
                "HTTP/1.0 200 OK\r\n"
                "Content-type: application/octet-stream\r\n"
                "Cache-control: no-cache\r\n"
                "HTTP/1.0 200 OK\r\n"
                "Content-type: application/octet-stream\r\n"
                "Cache-control: no-cache\r\n"
-               "Server: " SERVER_IDENTIFICATION "\r\n";
+               "Server: " SERVER_IDENTIFICATION "\r\n"
+               "Connection: close\r\n";
 }
        
 void UDPInput::add_destination(const string &stream_id)
 }
        
 void UDPInput::add_destination(const string &stream_id)