From: main at springtimesoftware dot com Operating system: Windows XP PHP version: 5.1.6 PHP Bug Type: Feature/Change Request Bug description: Plus sign in URL arg received as space
Description: ------------ I searched the bug database, but could not find this problem addressed. This is a simple case using default configurations where a client JavaScript script sends a plus sign and a space as an argument as part of a URL to a server. The script constructs the URL using the JavaScript 'escape' function, as recommended: URL='www.example.com/example.php?Arg='+escape('+ '); The server, running Apache and PHP, automatically runs urldecode (that is, I think it does; I could not find this documented in the PHP manual even after I did a lot of searching). The PHP code $Arg=$_GET["Arg"]; receives the string as " " (two spaces) instead of the expected "+ ". This is not a bug, but documented behavior of urldecode! My request for a feature is this: add a runtime-accessible configuration option to suppress any default decoding of GET, POST, and other such arrays. Then the programmer can use rawurldecode to decode arguments properly. Note: Although I only mentioned plus sign and space above, I really want to pass a string that can contain characters with any byte value, 0 to 255. This is to support cryptology protocols. David Spector Springtime Software Reproduce code: --------------- Let me know if you really need a test case. It would include a client page and a server page. -- Edit bug report at http://bugs.php.net/?id=39078&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39078&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39078&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39078&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39078&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39078&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39078&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39078&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39078&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39078&r=support Expected behavior: http://bugs.php.net/fix.php?id=39078&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39078&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39078&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39078&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39078&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39078&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39078&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39078&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39078&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39078&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39078&r=mysqlcfg