From 760571083c82ef27e6d330a533959fe4ed4db081 Mon Sep 17 00:00:00 2001 From: Sahin Habermann Date: Thu, 8 Feb 2018 00:40:27 +0100 Subject: [PATCH] Include Port in Host --- client_http.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client_http.hpp b/client_http.hpp index 6803afc..d1c32d0 100644 --- a/client_http.hpp +++ b/client_http.hpp @@ -425,7 +425,7 @@ namespace SimpleWeb { std::unique_ptr streambuf(new asio::streambuf()); std::ostream write_stream(streambuf.get()); write_stream << method << " " << corrected_path << " HTTP/1.1\r\n"; - write_stream << "Host: " << host << "\r\n"; + write_stream << "Host: " << host << ":" << std::to_string(port) << "\r\n"; for(auto &h : header) write_stream << h.first << ": " << h.second << "\r\n"; return streambuf;