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;