agavi/agavi — pull request #1482 by thomasbachem (2014-03-05 13:19:31+00:00)
Title: Make cookie encoding configurable, encode spaces as %20 by default

**Use setrawcookie() + rawurlencode () instead of setcookie()**
As setcookie() encodes spaces as '+', but most Javascript implementations relying on decodeURI()/decodeURIComponent() do not decode '+' as space. Encoding spaces as %20 is understood everywhere.

**Add $encode argument to AgaviWebResponse::setCookie()**
So users can use a custom encoding of cookie values if needed, e.g. to match the encoding of a Javascript library.