]> git.sesse.net Git - cubemap/commitdiff
Fix an issue where “http” could sneak into the Host: header.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 27 May 2016 08:11:19 +0000 (10:11 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 27 May 2016 08:11:19 +0000 (10:11 +0200)
httpinput.cpp

index 9412e785b6b15fa41f889a6a6e6acc8fbde8dd86..9dcaeaa0191dd1951fc8fdb15f34148468c563c0 100644 (file)
@@ -34,7 +34,7 @@ namespace {
 
 string host_header(const string &host, const string &port)
 {
 
 string host_header(const string &host, const string &port)
 {
-       if (atoi(port.c_str()) == 80) {
+       if (port == "http" || atoi(port.c_str()) == 80) {
                return host;
        } else {
                return host + ":" + port;
                return host;
        } else {
                return host + ":" + port;