aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/http.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/http.c b/lib/http.c
index 9372e488e..711775bbd 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -293,10 +293,7 @@ CURLcode http(struct connectdata *conn)
}
if(!checkheaders(data, "Host:")) {
- if(data->port != PORT_HTTP)
- data->ptr_host = maprintf("Host: %s:%d\r\n", host, data->port);
- else
- data->ptr_host = maprintf("Host: %s\r\n", host);
+ data->ptr_host = maprintf("Host: %s:%d\r\n", host, data->remote_port);
}
if(!checkheaders(data, "Pragma:"))