Index: src/OFHTTPClient.m ================================================================== --- src/OFHTTPClient.m +++ src/OFHTTPClient.m @@ -380,20 +380,22 @@ headers = [[[request headers] mutableCopy] autorelease]; if (headers == nil) headers = [OFMutableDictionary dictionary]; - if (([scheme isEqual: @"http"] && [URL port] != 80) || - ([scheme isEqual: @"https"] && [URL port] != 443)) { - OFString *host = [OFString stringWithFormat: - @"%@:%d", [URL host], [URL port]]; - - [headers setObject: host - forKey: @"Host"]; - } else - [headers setObject: [URL host] - forKey: @"Host"]; + if ([headers objectForKey: @"Host"] == nil) { + if (([scheme isEqual: @"http"] && [URL port] != 80) || + ([scheme isEqual: @"https"] && [URL port] != 443)) { + OFString *host = [OFString stringWithFormat: + @"%@:%d", [URL host], [URL port]]; + + [headers setObject: host + forKey: @"Host"]; + } else + [headers setObject: [URL host] + forKey: @"Host"]; + } user = [URL user]; password = [URL password]; if (([user length] > 0 || [password length] > 0) &&