0

Browser sends a cookie like fbm_123456=base_domain=.test.com; (it's a cookie that was set by Facebook Javascript SDK), it's how I see from FireBug.

But when i'm reading it on server side, my cookie.getValue() returns only base_domain as value, I mean that =.test.com part is lost. All other cookie parameters are null (that's fine).

How it's possible? Maybe I've missed something with cookies, and it's some kind of special cookie? How I can get original cookie value?

1 Answer 1

1

The cookie is invalid. '=' characters are not permitted in cookie names or values. If you are using Tomcat then in later versions you can use the following system property to allow the invalid cookie to be read:

-Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_EQUALS_IN_VALUE=true

The correct cookie value should be:

fbm_123456="base_domain=.test.com"

(note the quotes)

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! it's not so good news :( I can't change cookie format (its FB cookie), and don't have access to system properties (it's a plugin, not a final app). Is there any other way to read raw cookie value?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.