small fix to allow fronting

This commit is contained in:
archivaldo 2019-03-07 16:40:19 -03:00
parent 6afe7f164e
commit dedcc43216

View File

@ -2066,6 +2066,8 @@ inline void Client::write_request(Stream& strm, Request& req)
path.c_str());
// Headers
if (!req.has_header("Host"))
{
if (is_ssl()) {
if (port_ == 443) {
req.set_header("Host", host_.c_str());
@ -2079,6 +2081,7 @@ inline void Client::write_request(Stream& strm, Request& req)
req.set_header("Host", host_and_port_.c_str());
}
}
}
if (!req.has_header("Accept")) {
req.set_header("Accept", "*/*");