aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/url.c b/lib/url.c
index 4238256cb..58c7331c8 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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]);