Setrawcookie in CHttpCookies

Hello everybody,

is that possible for me setrawcookie in CHttpCookies?

I meet firefox-specific problem. The cookie function encode space character to plus sign (+). But when I use jQuery cookie plugin to retrieve it failed to decoded the plus to spaces. That’s why I think it is better to suse setrawcookie and manually rawurlencod the value…

You should open a ticket for it to be fixed

For now, you should extend CCookieCollection to fix it

PS: still working in the layout module … will be ready soon

I’ve extended the CCookieCollection, but I don’t know where to change the object’s class in config…

Since "cookie" object it is under "request" object. So where should I point cookie object to my own create class??

It’s not possible to configure a custom CCookieCollection, so you have to extend CHttpRequest like this:




class MyHttpRequest extends CHttpRequest

{


        public function getCookies()

        {

                if($this->_cookies!==null)

                        return $this->_cookies;

                else

                        return $this->_cookies=new MyCookieCollection($this);

        }


}



Then in config:




'components' => array(

   'request' => array(

      'class' => 'application.components.MyHttpRequest',

   ),

),



Can you create a ticket for this issue please?

Thanks Y!!

Ok, I’ll create the ticket, on the Yii’s Google project right?