0

I know that according to the documentation, cookie values should not contain white space, and I've already read this topic Why do cookie values with whitespace arrive at the client side with quotes?

But I still have a problem with it. I get cookie value

emailAddress=john.doe@mail.com&firstName=John&authenticationExpiresUTC=12/05/2014 10:41:35

I need to change some information in them and then return cookie in the same format, because the other services expects it to be so.

The services is .NET, I don't even have access to them. So, I can't change anything in their code, and use URL-encode/decode or something like this.

Is there any solution of the problem? Thanks in advance.

EDITED: I should set edited cookie value in Java.

Community
  • 1
  • 1
Jane Morazi
  • 39
  • 1
  • 5
  • u can encode the value before adding it in the cookie –  Feb 11 '14 at 11:08
  • @Arvind when I tryied it, the cookie looks such like this emailAddress%3Djohn.doe%40mail.com%26firstName%3DJohn%26authenticationExpiresUTC%3D11%2F05%2F2014+13%3A43%3A42 If other services was Java, it would not cause any issues to decode this value. But right now .Net service expects cookie in a format without encoded charecters. – Jane Morazi Feb 11 '14 at 11:13
  • Hope this will Help :) By encoding the value [Encode URI][1] [1]: http://stackoverflow.com/questions/444112/how-do-i-encode-uri-parameter-values – Amila Iddamalgoda Feb 11 '14 at 11:14
  • @Jane where exactly r u facing problem in updating value of cookie? –  Feb 11 '14 at 11:17
  • @Arvind In Java. When add edited cookie value, it appears in quotes. – Jane Morazi Feb 11 '14 at 11:21

0 Answers0