cvs: php-src(PHP_5_2) /ext/curl streams.c
| From: | Michael Wallner | Date: | Tue, 06 Jun 2006 21:38:03 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/curl streams.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-38631@lists.php.net to get a copy of this message | ||
mike Tue Jun 6 21:38:03 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/curl streams.c
Log:
- only try to fetch stream context options if context is set
http://cvs.php.net/viewcvs.cgi/php-src/ext/curl/streams.c?r1=1.14.2.2.2.1&r2=1.14.2.2.2.2&diff_format=u
Index: php-src/ext/curl/streams.c
diff -u php-src/ext/curl/streams.c:1.14.2.2.2.1 php-src/ext/curl/streams.c:1.14.2.2.2.2
--- php-src/ext/curl/streams.c:1.14.2.2.2.1 Thu May 25 12:41:35 2006
+++ php-src/ext/curl/streams.c Tue Jun 6 21:38:03 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.14.2.2.2.1 2006/05/25 12:41:35 mike Exp $ */
+/* $Id: streams.c,v 1.14.2.2.2.2 2006/06/06 21:38:03 mike Exp $ */
/* This file implements cURL based wrappers.
* NOTE: If you are implementing your own streams that are intended to
@@ -300,7 +300,7 @@
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, FG(user_agent) ? FG(user_agent) :
"PHP/" PHP_VERSION);
/* TODO: read cookies and options from context */
- if (!strncasecmp(filename, "http", sizeof("http")-1)) {
+ if (context && !strncasecmp(filename, "http", sizeof("http")-1)) {
/* HTTP(S) */
if (SUCCESS == php_stream_context_get_option(context, "http", "user_agent",
&ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, Z_STRVAL_PP(ctx_opt));