Why do cookie values with whitespace arrive at the client side with quotes?

前端 未结 4 1097
被撕碎了的回忆
被撕碎了的回忆 2020-11-28 09:17

I\'m a .NET developer starting to dabble in Java.

In .NET, I can set the value of a cookie to a string with white space in it: new HttpCookie(\"myCookieName\"

4条回答
  •  遥遥无期
    2020-11-28 09:59

    It probably has to do with the way Java encodes the cookie. I suggest you try calling setVersion(1) on the new cookie and see if that works for you.

提交回复
热议问题