mirror of
https://github.com/curl/curl.git
synced 2026-08-26 05:23:33 +03:00
remade the port number stuff so that following locations work and doing
intermixed HTTP and FTP persistant connections also work!
This commit is contained in:
parent
a3ba6b7a6a
commit
d1cfbd51b5
5 changed files with 50 additions and 52 deletions
|
|
@ -465,14 +465,14 @@ CURLcode Curl_http(struct connectdata *conn)
|
|||
/* if ptr_host is already set, it is OK since we only re-use connections
|
||||
to the very same host and port */
|
||||
|
||||
if(((conn->protocol&PROT_HTTPS) && (data->remote_port == PORT_HTTPS)) ||
|
||||
(!(conn->protocol&PROT_HTTPS) && (data->remote_port == PORT_HTTP)) )
|
||||
if(((conn->protocol&PROT_HTTPS) && (conn->remote_port == PORT_HTTPS)) ||
|
||||
(!(conn->protocol&PROT_HTTPS) && (conn->remote_port == PORT_HTTP)) )
|
||||
/* If (HTTPS on port 443) OR (non-HTTPS on port 80) then don't include
|
||||
the port number in the host string */
|
||||
conn->allocptr.host = aprintf("Host: %s\r\n", host);
|
||||
else
|
||||
conn->allocptr.host = aprintf("Host: %s:%d\r\n", host,
|
||||
data->remote_port);
|
||||
conn->remote_port);
|
||||
}
|
||||
|
||||
if(!checkheaders(data, "Pragma:"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue