From: Sara Golemon Date: Tue, 31 Aug 2004 20:11:32 +0000 (+0000) Subject: MFH: Use user_agent ini setting if it's available. X-Git-Tag: php-5.0.2RC1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43004bcaaaa8cedfb6110c7721d606c98b446913;p=php MFH: Use user_agent ini setting if it's available. --- 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 */