2009/3/16 bvh <[email protected]>:
> Hopefully because I keep getting :
>
> Could not parse 'Cookie:
> dbx-postmeta=grabit:0+|1-|2-|3-|4-|5-|6-&advancedstuff:0-|1-|2-;
> pbr_next_event=-1', stopped at
> : ':0+|1-|2-|3-|4-|5-|6-&advancedstuff:0-|1-|2-; pbr_next_event=-1'
>
> warnings in my log. Unfortunatly I need to get the cookie to work for
> lifting arguments from links that users that are not currently logged
> into facebook click on. The way to get the login is to redirect to a
> facebooklogin page and let that one redirect back to you afterwards.
>

I modified cookie parsing to be much less strict than before. The new
cookie parsing strategy:
- First, split the string on cookie separators. ';' is cookie
separator. ',' is not a cookie separator (as in PHP)
- The substring before the first '=' is the CookieName, everything
after it is CookieValue. If no '=' is present, everything is
CookieName and CookieValue is empty.
- Trim CookieName, trim CookieValue
- URL decode the CookieName and CookieValue
- If CookieName is empty, also ignore CookieValue

With these changes, you can set exotic cookies like:
app->setCookie("h=e;l=lo;", "w...@r\"ld", 3600);

Also, the bug that prevented multiple cookies to be set at once is fixed.

The quoted-string approach that was present in the cookie parser is
gone. '\' is also no longer treated as an escape character.

These changes will be pushed in git soon.

Best regards,
Wim.

------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to