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 9412e78..9dcaeaa 100644 (file)
@@ -34,7 +34,7 @@ namespace {
 
 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;