Re: base64-encoding in cookies?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jon Anderson writes:

> I won't argue that this behavior should probably be documented with 
> $_COOKIE, but it is documented with it's counterpart, setcookie: "Note 
> that the value portion of the cookie will automatically be urlencoded 
> when you send the cookie, and when it is received, it is automatically 
> decoded and assigned to a variable by the same name as the cookie name. 

Bingo!  Thank you, thank you, thank you.  This is exactly what I have
been missing all along.  It is not where I would have looked for it,
but I guess now I'll have to stop complaining it does not exist.

> If you don't want this, you can use setrawcookie() 

I wonder why PHP doesn't have a corresponding variable, $_RAWCOOKIE, to be
used with setrawcookie()?  That would have solved my problem.

> <http://www.php.net/manual/en/function.setrawcookie.php> instead if you 
> are using PHP 5."
> 
> In terms of the behavior, I think it makes total sense. The only case 
> where it would ever bite you is yours (which is rare because most people 
> wouldn't mix perl and PHP in the same system). 

I am beginning to understand why I am having so much trouble convincing
folks here that my problem is real.  Everyone seems to assume that cookies
are used only to communicate between one web application and a browser.
Perhaps my situation is rare.  It doesn't seem very rare to me.  :)

> I think some of the negativity aimed at you stems from the fact that the 
> behavior has been explained and is quite clear. > There isn't much point 
> in arguing what it should be. It is exactly what it is. If you want to 
> argue what the behavior should be, try php-dev. (Making that kind of 
> argument here is like yelling at your neighbor 'cause Vista 
> sucks...assuming Bill Gates isn't your neighbor. :-)

Point taken.  Maybe I *should* go to php-dev.  However, I fear they would
be an even harder sell than you guys.  :)  And life is too short for that.
Thanks, Jon, for a very insightful message.

Fletcher

Ps - if I were to go to php-dev, I think I would lobby for the addition of
a new global variable: $_RAWCOOKIE.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux