From f8cae4fde5b5b41626f196be461aa3b18751b092 Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 24 Nov 2016 17:55:09 +0100 Subject: [PATCH] Corrected path when using proxy server in client --- client_http.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client_http.hpp b/client_http.hpp index 3e36abc..f2abbe3 100644 --- a/client_http.hpp +++ b/client_http.hpp @@ -69,7 +69,7 @@ namespace SimpleWeb { if(corrected_path=="") corrected_path="/"; if(!config.proxy_server.empty()) - corrected_path=protocol()+"://" + config.proxy_server + corrected_path; + corrected_path=protocol()+"://"+host+':'+std::to_string(port)+corrected_path; boost::asio::streambuf write_buffer; std::ostream write_stream(&write_buffer); @@ -122,7 +122,7 @@ namespace SimpleWeb { if(corrected_path=="") corrected_path="/"; if(!config.proxy_server.empty()) - corrected_path=protocol()+"://" + config.proxy_server + corrected_path; + corrected_path=protocol()+"://"+host+':'+std::to_string(port)+corrected_path; content.seekp(0, std::ios::end); auto content_length=content.tellp();