Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngCookies Provide an option of not encoding cookie value for $cookies.put #13615

Open
kamarouski opened this issue Dec 23, 2015 · 4 comments
Open

Comments

@kamarouski
Copy link

For some scenarios we need to access a raw cookie rather than encoded one. This is especially important when dealing with legacy systems that relies on unencoded cookie values.

@Narretz
Copy link
Contributor

Narretz commented Dec 31, 2015

Given that the cookieWriter isn't awfully complicated, and this is not a very common requirement, it gets a -1 from me.

@YuraDubensky
Copy link

+1 from me. When cookie data is consumed by server (i.e. serialized json object), it brings additional complications.

@chancez
Copy link

chancez commented May 8, 2017

The existing behavior is fairly surprising and undocumented honestly. It took me a good while to debug why my content was being double url encoded. I thought it might be my server component doing something crazy, but it was because I was URL encoding my value before using $cookies.put, and it was even harder to debug because $cookies.get was showing me the same value I was putting, but thats because it does decoding on retrieval as well.

@Narretz
Copy link
Contributor

Narretz commented May 22, 2017

PRs for documenting this behavior are welcome!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants