summaryrefslogtreecommitdiff
path: root/ext/curl/streams.c
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2004-08-31 20:11:18 +0000
committerSara Golemon <pollita@php.net>2004-08-31 20:11:18 +0000
commit579575e4309268e426fa723f6fda90f2493e4417 (patch)
tree551ac4768b0d501a121d3d2489ef7b5b44f3523c /ext/curl/streams.c
parent0d3884fed1906f3243fb91f48776096fde99e84e (diff)
downloadphp-git-579575e4309268e426fa723f6fda90f2493e4417.tar.gz
Use user_agent ini setting if it's available.
Diffstat (limited to 'ext/curl/streams.c')
-rw-r--r--ext/curl/streams.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/curl/streams.c b/ext/curl/streams.c
index 4e709e9485..2c127e3fdb 100644
--- a/ext/curl/streams.c
+++ b/ext/curl/streams.c
@@ -299,7 +299,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
curl_easy_setopt(curlstream->curl, CURLOPT_PROGRESSDATA, stream);
curl_easy_setopt(curlstream->curl, CURLOPT_NOPROGRESS, 0);
- curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, "PHP/" PHP_VERSION);
+ curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, FG(user_agent) ? FG(user_agent) : "PHP/" PHP_VERSION);
/* TODO: read cookies and options from context */