svn: /php/php-src/ branches/PHP_5_2/ext/curl/tests/bug46739.phpt branches/PHP_5_3/ext/curl/tests/bug46739.phpt trunk/ext/curl/interface.c
| From: | Rasmus Lerdorf | Date: | Sun, 26 Jul 2009 02:12:38 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_2/ext/curl/tests/bug46739.phpt branches/PHP_5_3/ext/curl/tests/bug46739.phpt trunk/ext/curl/interface.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-59813@lists.php.net to get a copy of this message | ||
rasmus Sun, 26 Jul 2009 02:12:38 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=286340
Log:
The test for bug #46739 doesn't actually need the remote
responder, so get rid of the skipif in PHP 5, and it was
broken in PHP 6 because the keys in the curl_info array
were not unicode. All internally-generated arrays should
have unicode keys.
Bug: http://bugs.php.net/46739 (Closed) array returned by
curl_getinfo should contain content_type key
Changed paths:
U php/php-src/branches/PHP_5_2/ext/curl/tests/bug46739.phpt
U php/php-src/branches/PHP_5_3/ext/curl/tests/bug46739.phpt
U php/php-src/trunk/ext/curl/interface.c
Modified: php/php-src/branches/PHP_5_2/ext/curl/tests/bug46739.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/ext/curl/tests/bug46739.phpt 2009-07-26 01:24:12 UTC (rev 286339)
+++ php/php-src/branches/PHP_5_2/ext/curl/tests/bug46739.phpt 2009-07-26 02:12:38 UTC (rev 286340)
@@ -5,9 +5,6 @@
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
-if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
- exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
-}
?>
--FILE--
<?php
Modified: php/php-src/branches/PHP_5_3/ext/curl/tests/bug46739.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/curl/tests/bug46739.phpt 2009-07-26 01:24:12 UTC (rev 286339)
+++ php/php-src/branches/PHP_5_3/ext/curl/tests/bug46739.phpt 2009-07-26 02:12:38 UTC (rev 286340)
@@ -5,9 +5,6 @@
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
-if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
- exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
-}
?>
--FILE--
<?php
Modified: php/php-src/trunk/ext/curl/interface.c
===================================================================
--- php/php-src/trunk/ext/curl/interface.c 2009-07-26 01:24:12 UTC (rev 286339)
+++ php/php-src/trunk/ext/curl/interface.c 2009-07-26 02:12:38 UTC (rev 286340)
@@ -152,10 +152,10 @@
#define SAVE_CURL_ERROR(__handle, __err) (__handle)->err.no = (int) __err;
-#define CAAL(s, v) add_assoc_long_ex(return_value, s, sizeof(s), (long) v);
-#define CAAD(s, v) add_assoc_double_ex(return_value, s, sizeof(s), (double) v);
+#define CAAL(s, v) add_ascii_assoc_long_ex(return_value, s, sizeof(s), (long) v);
+#define CAAD(s, v) add_ascii_assoc_double_ex(return_value, s, sizeof(s), (double) v);
#define CAAS(s, v) add_ascii_assoc_string(return_value, s, (v ? v : ""), 1);
-#define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
+#define CAAZ(s, v) add_ascii_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
#if defined(PHP_WIN32) || defined(__GNUC__)
# define php_curl_ret(__ret) RETVAL_FALSE; return __ret;