Re: Re: ; arg seperator
| From: | Jani Taskinen | Date: | Tue, 03 Apr 2001 21:19:11 +0000 |
| Subject: | Re: Re: ; arg seperator | ||
| References: | 1 | Groups: | php.dev php.qa |
| Request: | Send a blank email to php-dev+get-50762@lists.php.net to get a copy of this message | ||
On Tue, 3 Apr 2001, Rasmus Lerdorf wrote:
>I disagree, we explicitly document that the arg_separator defaults to &
>and that this is the character that separates url arguments. This follows
>the original CGI specification. The fact that this is no longer the
>accepted standard for this doesn't mean we can just up and change it in a
>minor PHP version.
One thing to remember: arg_separator is supposed to be used when
PHP _outputs_ urls, like transparent session id's. And not be used
when parsing URLs and creating the variables in main/php_variables.c
This is said also in php.ini:
; The separator used in PHP generated URLs to separate arguments.
; Default is "&".
So question is: Should we support ; or & in "incoming" urls?
Now both work. Which (IMO) is the right way. And if people want to
use something like this:
foo.php?a=1;2;3, they should url encode the string.
Which reminds me: If arg_separator is used like it was before my patch
and you set it to e.g. ';' and then have a form which method
is GET..well, it won't work. there would be one variable
holding all the info.
So, another directive into php.ini? (I don't like that idea :)
--Jani