mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
The Host: header now includes the port number if not default HTTP
This commit is contained in:
parent
d9c41a0ffd
commit
e999182758
@ -269,9 +269,12 @@ CURLcode http(struct connectdata *conn)
|
|||||||
http->sendit = getFormData(data->httppost, &http->postsize);
|
http->sendit = getFormData(data->httppost, &http->postsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!checkheaders(data, "Host:"))
|
if(!checkheaders(data, "Host:")) {
|
||||||
data->ptr_host = maprintf("Host: %s\r\n", 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);
|
||||||
|
}
|
||||||
|
|
||||||
if(!checkheaders(data, "Pragma:"))
|
if(!checkheaders(data, "Pragma:"))
|
||||||
http->p_pragma = "Pragma: no-cache\r\n";
|
http->p_pragma = "Pragma: no-cache\r\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user