From: Steinar H. Gunderson Date: Fri, 27 May 2016 08:11:19 +0000 (+0200) Subject: Fix an issue where “http” could sneak into the Host: header. X-Git-Tag: 1.3.0~5 X-Git-Url: https://git.sesse.net/?p=cubemap;a=commitdiff_plain;h=bff5371d96506c8571fdeeafc5404c362022685b;hp=bd5882e9ab6c9c4f280a5eb5ca24da2d5275d756 Fix an issue where “http” could sneak into the Host: header. --- diff --git a/httpinput.cpp b/httpinput.cpp index 9412e78..9dcaeaa 100644 --- a/httpinput.cpp +++ b/httpinput.cpp @@ -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;