From bff5371d96506c8571fdeeafc5404c362022685b Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 27 May 2016 10:11:19 +0200 Subject: [PATCH 1/1] =?utf8?q?Fix=20an=20issue=20where=20=E2=80=9Chttp?= =?utf8?q?=E2=80=9D=20could=20sneak=20into=20the=20Host:=20header.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- httpinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2