kalle                                    Mon, 13 Dec 2010 14:29:42 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=306341

Log:
Revert fix for bug #53493 to be compliant with the XML specification

Bug: http://bugs.php.net/53493 (Assigned) xmlrpc_decode should not be sensitive 
to leading whitespace
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    D   php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt
    U   php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c
    D   php/php-src/trunk/ext/xmlrpc/tests/bug53493.phpt
    U   php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2010-12-13 13:50:40 UTC (rev 306340)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-12-13 14:29:42 UTC (rev 306341)
@@ -51,9 +51,6 @@
 - Streams:
   . Implemented FR #26158 (open arbitrary file descriptor with fopen). 
(Gustavo)

-- XMLRPC-EPI:
-  . Fixed bug #53493 (xmlrpc_decode should not be sensitive to leading
-    whitespace). (Kalle)

 09 Dec 2010, PHP 5.3.4
 - Upgraded bundled Sqlite3 to version 3.7.3. (Ilia)

Deleted: php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt 2010-12-13 
13:50:40 UTC (rev 306340)
+++ php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt 2010-12-13 
14:29:42 UTC (rev 306341)
@@ -1,15 +0,0 @@
---TEST--
-Bug #53493 (xmlrpc_decode should not be sensitive to leading whitespace)
---FILE--
-<?php
-$req =                 PHP_EOL .
-               '<?xml version="1.0"?><methodResponse><params><param>' .
-               '<value><string>Hello World</string></value></param>' .
-               '</params></methodResponse>';
-
-var_dump(xmlrpc_decode($req));
-echo "Done\n";
-?>
---EXPECT--
-string(11) "Hello World"
-Done

Modified: php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c    2010-12-13 
13:50:40 UTC (rev 306340)
+++ php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c    2010-12-13 
14:29:42 UTC (rev 306341)
@@ -845,10 +845,7 @@
        }

        if (return_value_used) {
-               zval* retval;
-               char *trimmed = php_trim(arg1, arg1_len, NULL, 0, NULL, 1 
TSRMLS_CC);
-
-               retval = decode_request_worker(trimmed, strlen(trimmed), 
arg2_len ? arg2 : NULL, NULL);
+               zval* retval = decode_request_worker(arg1, arg1_len, arg2_len ? 
arg2 : NULL, NULL);
                if (retval) {
                        *return_value = *retval;
                        FREE_ZVAL(retval);

Deleted: php/php-src/trunk/ext/xmlrpc/tests/bug53493.phpt
===================================================================
--- php/php-src/trunk/ext/xmlrpc/tests/bug53493.phpt    2010-12-13 13:50:40 UTC 
(rev 306340)
+++ php/php-src/trunk/ext/xmlrpc/tests/bug53493.phpt    2010-12-13 14:29:42 UTC 
(rev 306341)
@@ -1,15 +0,0 @@
---TEST--
-Bug #53493 (xmlrpc_decode should not be sensitive to leading whitespace)
---FILE--
-<?php
-$req =                 PHP_EOL .
-               '<?xml version="1.0"?><methodResponse><params><param>' .
-               '<value><string>Hello World</string></value></param>' .
-               '</params></methodResponse>';
-
-var_dump(xmlrpc_decode($req));
-echo "Done\n";
-?>
---EXPECT--
-string(11) "Hello World"
-Done

Modified: php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c
===================================================================
--- php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c       2010-12-13 13:50:40 UTC 
(rev 306340)
+++ php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c       2010-12-13 14:29:42 UTC 
(rev 306341)
@@ -845,10 +845,7 @@
        }

        if (return_value_used) {
-               zval* retval;
-               char *trimmed = php_trim(arg1, arg1_len, NULL, 0, NULL, 1 
TSRMLS_CC);
-
-               retval = decode_request_worker(trimmed, strlen(trimmed), 
arg2_len ? arg2 : NULL, NULL);
+               zval* retval = decode_request_worker(arg1, arg1_len, arg2_len ? 
arg2 : NULL, NULL);
                if (retval) {
                        *return_value = *retval;
                        FREE_ZVAL(retval);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to