-1

Our signed cookies implementation works in Firefox, Chrome and IE.

We use the requests library for testing.

For some reason the request library seem to alter the cookie data.

We use session like in the docs: http://docs.python-requests.org/en/latest/user/advanced/

Any idea why the library changes the cookie data?

guettli
  • 25,042
  • 81
  • 346
  • 663

1 Answers1

1

Not all characters are allowed inside a cookie.

See https://github.com/kennethreitz/requests/issues/286

The library requests alters the data.

A solution might be to store the cookie data base64 encoded.

Related: Allowed characters in cookies

Community
  • 1
  • 1
guettli
  • 25,042
  • 81
  • 346
  • 663