1
0
mirror of synced 2025-07-20 16:02:59 +03:00
This commit is contained in:
yhirose
2025-07-10 01:37:36 -04:00
parent 8b28577ec6
commit ca1bed5cca
3 changed files with 49 additions and 1 deletions

View File

@ -8844,7 +8844,11 @@ inline bool ClientImpl::write_request(Stream &strm, Request &req,
}
if (!req.has_header("Host")) {
if (is_ssl()) {
// For Unix socket connections, use "localhost" as Host header (similar to
// curl behavior)
if (address_family_ == AF_UNIX) {
req.set_header("Host", "localhost");
} else if (is_ssl()) {
if (port_ == 443) {
req.set_header("Host", host_);
} else {