felipe Sun, 07 Nov 2010 12:59:22 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=305159
Log: - Fixed bug #53248 (rawurlencode RFC 3986 EBCDIC support misses tilde char). patch by: Justin Martin (frozenf...@php) Bug: http://bugs.php.net/53248 (Open) rawurlencode RFC 3986 EBCDIC support Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug53248.phpt U php/php-src/branches/PHP_5_3/ext/standard/url.c A php/php-src/trunk/ext/standard/tests/url/bug53248.phpt U php/php-src/trunk/ext/standard/url.c Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2010-11-07 12:51:59 UTC (rev 305158) +++ php/php-src/branches/PHP_5_3/NEWS 2010-11-07 12:59:22 UTC (rev 305159) @@ -53,6 +53,8 @@ obtained with ReflectionClass::getProperties(). (Gustavo) - Fixed covariance of return-by-ref constraints. (Etienne) +- Fixed bug #53248 (rawurlencode RFC 3986 EBCDIC support misses tilde char). + (Justin Martin) - Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails with streams opened with, inter alia, the 'xb' mode). (Gustavo) - Fixed bug #53226 (file_exists fails on big filenames). (Adam) Added: php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug53248.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug53248.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug53248.phpt 2010-11-07 12:59:22 UTC (rev 305159) @@ -0,0 +1,12 @@ +--TEST-- +Bug #53248 (rawurlencode RFC 3986 EBCDIC support) +--FILE-- +<?php + +var_dump(rawurlencode('A1_-.~')); +var_dump(rawurldecode('%41%31%5F%2D%2E%7E')); + +?> +--EXPECTF-- +string(6) "A1_-.~" +string(6) "A1_-.~" \ No newline at end of file Property changes on: php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug53248.phpt ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native Modified: php/php-src/branches/PHP_5_3/ext/standard/url.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/standard/url.c 2010-11-07 12:51:59 UTC (rev 305158) +++ php/php-src/branches/PHP_5_3/ext/standard/url.c 2010-11-07 12:59:22 UTC (rev 305159) @@ -585,7 +585,7 @@ str[y++] = hexchars[(unsigned char) s[x] >> 4]; str[y] = hexchars[(unsigned char) s[x] & 15]; #else /*CHARSET_EBCDIC*/ - if (!isalnum(str[y]) && strchr("_-.", str[y]) != NULL) { + if (!isalnum(str[y]) && strchr("_-.~", str[y]) != NULL) { str[y++] = '%'; str[y++] = hexchars[os_toascii[(unsigned char) s[x]] >> 4]; str[y] = hexchars[os_toascii[(unsigned char) s[x]] & 15]; Added: php/php-src/trunk/ext/standard/tests/url/bug53248.phpt =================================================================== --- php/php-src/trunk/ext/standard/tests/url/bug53248.phpt (rev 0) +++ php/php-src/trunk/ext/standard/tests/url/bug53248.phpt 2010-11-07 12:59:22 UTC (rev 305159) @@ -0,0 +1,12 @@ +--TEST-- +Bug #53248 (rawurlencode RFC 3986 EBCDIC support) +--FILE-- +<?php + +var_dump(rawurlencode('A1_-.~')); +var_dump(rawurldecode('%41%31%5F%2D%2E%7E')); + +?> +--EXPECTF-- +string(6) "A1_-.~" +string(6) "A1_-.~" \ No newline at end of file Property changes on: php/php-src/trunk/ext/standard/tests/url/bug53248.phpt ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native Modified: php/php-src/trunk/ext/standard/url.c =================================================================== --- php/php-src/trunk/ext/standard/url.c 2010-11-07 12:51:59 UTC (rev 305158) +++ php/php-src/trunk/ext/standard/url.c 2010-11-07 12:59:22 UTC (rev 305159) @@ -585,7 +585,7 @@ str[y++] = hexchars[(unsigned char) s[x] >> 4]; str[y] = hexchars[(unsigned char) s[x] & 15]; #else /*CHARSET_EBCDIC*/ - if (!isalnum(str[y]) && strchr("_-.", str[y]) != NULL) { + if (!isalnum(str[y]) && strchr("_-.~", str[y]) != NULL) { str[y++] = '%'; str[y++] = hexchars[os_toascii[(unsigned char) s[x]] >> 4]; str[y] = hexchars[os_toascii[(unsigned char) s[x]] & 15];
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php