JBoss 5 truncates trailing = of a base64 cookie string?

If so, then you could switch to an alternative encoding mechanism, one which doesn't use characters which may clash with the cookie specification. For example Apache Commons Codec includes a Hex class which can encode and decode binary data to and from a hex string.It'd be larger than the equivalent data in base64, but that may not matter.

If so, then you could switch to an alternative encoding mechanism, one which doesn't use characters which may clash with the cookie specification. For example, Apache Commons Codec includes a Hex class which can encode and decode binary data to and from a hex string.It'd be larger than the equivalent data in base64, but that may not matter. Alternatively, you could play with the Cookie API a bit.

The javadoc for Cookie.setValue() says: With Version 0 cookies, values should not contain white space, brackets, parentheses, equals signs, commas, double quotes, slashes, question marks, at signs, colons, and semicolons. Empty values may not behave the same way on all browsers. So technically, base64 encoding is not compatible with version 0 cookies, which may be the default.

You could try calling setVersion(1) on the cookie, and see if that makes a difference, although then you run the risk of browser compatibility issues.

Oh I didn't know these stuff... as a matter of fact I do have control over the cookies creation so I'll examine other formats as you suggested. Thanks. – LiorH Nov 8 '09 at 20:11.

If I understand the bug report correctly, a correct implementation of the encoder would always produce a string which is a multiple of 4, so if you add the bug fix, it will not trigger in other app servers than JBoss. Your code will thus work on all servers. On a side note, perhaps you could implement it as a servlet filter, which will be minimally intrusive for you app.

For jboss 5 set the below system property: org.apache.catalina. STRICT_SERVLET_COMPLIANCE=false --bala.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions