#28319 [NEW]: Query string parsing not respecting semicolon as a delimiter
| From: | nick at careercast dot com | Date: | Fri, 07 May 2004 17:51:10 +0000 |
| Subject: | #28319 [NEW]: Query string parsing not respecting semicolon as a delimiter | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-59369@lists.php.net to get a copy of this message | ||
From: nick at careercast dot com
Operating system: Linux
PHP version: 4.3.4
PHP Bug Type: CGI related
Bug description: Query string parsing not respecting semicolon as a delimiter
Description:
------------
W3C spec indicates that valid separators for name value pairs are "&" and
";".
http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.2.2
"We recommend that HTTP server implementors, and in particular, CGI
implementors support the use of ";" in place of "&" to save authors the
trouble of escaping "&" characters in this manner."
This becomes an issue when you are dealing with xml/xsl/xhtml, because you
can no longer use:
http://host/script.php?var1=bob&var2=jim
instead, you have to use:
http://host/script.php?var1=bob&var2=jim
PHP should follow the W3C recommendation and support ";" as a delimiter
for name/value pairs in URLs
Reproduce code:
---------------
<xmp>
<?php
print_r ($_GET);
?>
</xmp>
And then call this script with this query string:
?var1=bob;var2=jim
Expected result:
----------------
Array
(
[var1] => bob
[var2] => jim
)
Actual result:
--------------
Array
(
[var1] => bob;var2=jim
)
--
Edit bug report at http://bugs.php.net/?id=28319&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28319&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28319&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28319&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28319&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28319&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28319&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28319&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28319&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28319&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28319&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28319&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28319&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28319&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28319&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28319&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28319&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28319&r=float