diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-07-11 09:08:27 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-07-11 09:08:27 +0000 |
commit | 0d058d2174d9b11d0854826d2739f56595434255 (patch) | |
tree | 635b9af760ae720528e366396e3bea2126ac6059 /lib | |
parent | 8d49a8f2787676bfe8621f1e0cdb9f42ac23c809 (diff) |
- Daniel Fandrich found out we didn't pass on the user-agent properly when
doing "proxy-tunnels" with non-HTTP prototols and that was simply because
the code assumed the user-agent was only needed for HTTP.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -4278,10 +4278,12 @@ static CURLcode setup_conn(struct connectdata *conn, lingering set from a previous invoke */ conn->bits.proxy_connect_closed = FALSE; - /************************************************************* - * Set user-agent for HTTP - *************************************************************/ - if((conn->protocol&PROT_HTTP) && data->set.str[STRING_USERAGENT]) { + /* + * Set user-agent. Used for HTTP, but since we can attempt to tunnel + * basically anything through a http proxy we can't limit this based on + * protocol. + */ + if(data->set.str[STRING_USERAGENT]) { Curl_safefree(conn->allocptr.uagent); conn->allocptr.uagent = aprintf("User-Agent: %s\r\n", data->set.str[STRING_USERAGENT]); |