Bug #28319 [Com]: Query string parsing not respecting semicolon as a delimiter

2010-10-18 Thread kaldari at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=28319edit=1

 ID: 28319
 Comment by: kaldari at gmail dot com
 Reported by:nick at careercast dot com
 Summary:Query string parsing not respecting semicolon as a
 delimiter
 Status: Bogus
 Type:   Bug
 Package:CGI related
 Operating System:   Linux
 PHP Version:4.3.4
 Block user comment: N

 New Comment:

Why is this bug marked as Bogus?


Previous Comments:

[2004-05-07 19:54:55] w...@php.net

http://www.php.net/manual/en/configuration.directives.php#ini.arg-separator.input


[2004-05-07 19:51:09] nick at careercast dot com

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=bobvar2=jim



instead, you have to use:



http://host/script.php?var1=bobamp;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 this bug report at http://bugs.php.net/bug.php?id=28319edit=1


Bug #28319 [Com]: Query string parsing not respecting semicolon as a delimiter

2010-10-18 Thread kaldari at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=28319edit=1

 ID: 28319
 Comment by: kaldari at gmail dot com
 Reported by:nick at careercast dot com
 Summary:Query string parsing not respecting semicolon as a
 delimiter
 Status: Bogus
 Type:   Bug
 Package:CGI related
 Operating System:   Linux
 PHP Version:4.3.4
 Block user comment: N

 New Comment:

Ah, I found it. It's because you can set the arg separator used by PHP
with the arg_separator.input directive in your php.ini file. The URL
above is broken, by the way, which is why this wasn't evident.


Previous Comments:

[2010-10-19 07:11:25] kaldari at gmail dot com

Why is this bug marked as Bogus?


[2004-05-07 19:54:55] w...@php.net

http://www.php.net/manual/en/configuration.directives.php#ini.arg-separator.input


[2004-05-07 19:51:09] nick at careercast dot com

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=bobvar2=jim



instead, you have to use:



http://host/script.php?var1=bobamp;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 this bug report at http://bugs.php.net/bug.php?id=28319edit=1