This commit is contained in:
yhirose authored and GitHub committed 2025-07-10 22:01:41 -04:00
1 parent 8b28577ec6
commit 7b6867bcdf
3 files changed
+49 -1

No files matched your search

+5 -1
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 {