dflydev / dflydev-fig-cookies

Cookies for PSR-7 HTTP Message Interface.
MIT License
224 stars 29 forks source link

Problems with urlencode #25

Open ajgarlag opened 7 years ago

ajgarlag commented 7 years ago

I'm writing a proxy script where I have a middleware to alter the domain param of cookies.

The problem is that the urlencode and urldecode calls are altering the cookie name and value sent by the upstream server (which is out of my control).

Maybe an option could be added to work with raw data. What do you think?

edwardteach42 commented 7 years ago

I fixed this in Pull Request #27

urlencode is disabled by default and you can add the withUrlEncode(true) param if you want it done to the cookie name and value.