summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2004-08-31 20:11:32 +0000
committerSara Golemon <pollita@php.net>2004-08-31 20:11:32 +0000
commit43004bcaaaa8cedfb6110c7721d606c98b446913 (patch)
tree203552a83e08b6461431b25f674275576d039c00
parent98c0dd41478b683dc3e9ff457a32a83d22e09233 (diff)
downloadphp-git-43004bcaaaa8cedfb6110c7721d606c98b446913.tar.gz
MFH: Use user_agent ini setting if it's available.
-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 */