From f6d7f7d984a5b4e1bb9c6471fd938193af90b94a Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 9 Jun 2016 15:48:31 -0400 Subject: [PATCH] set port to 80 is not specified --- HTTPProxy.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/HTTPProxy.cpp b/HTTPProxy.cpp index ec3dcffa..c1ebc4e8 100644 --- a/HTTPProxy.cpp +++ b/HTTPProxy.cpp @@ -223,14 +223,13 @@ namespace proxy { u.parse(t); dest_host = u.host; dest_port = u.port; - if (dest_port == 0) - dest_port = 80; /* always set port for CreateStream() */ } else { /* relative url and missing 'Host' header */ std::string message = "Can't detect destination host from request"; HTTPRequestFailed(message.c_str()); return true; } + if (!dest_port) dest_port = 80; /* always set port for CreateStream() */ //TODO: 443 for https /* make relative url */ url.schema = ""; url.host = "";