Thanks for reply Mark,

So you suggest to change the following method:

protected String encodeToken(String username, String value)
   {
      StringBuilder sb = new StringBuilder();
      sb.append(username);
      sb.append(":");
      sb.append(value);
      return Base64.encodeBytes(sb.toString().getBytes());

Can you suggest a work around for this ?

This code is from seam but i can override a component if not sufficient.
The special characters i have in the specific email address (username  is .
and @
But i really need to support all characters that can be applied in email
address.

Thanks!

On Sat, Dec 5, 2009 at 3:37 PM, Mark Thomas <ma...@apache.org> wrote:

> itay sahar wrote:
> > Caused by: java.lang.IllegalArgumentException: Control character in
> cookie
> > value, consider BASE64 encoding your value
> >         at
> >
> org.apache.tomcat.util.http.ServerCookie.maybeQuote2(ServerCookie.java:396)
>
> To cause this, there must be a character in the value with an ASCII code
>  of less than 0x20 or greater or equal to 0x7f and is not 0x09.
>
> You need to fix that first.
>
> Then you'll need to worry about Base64 using '=' in cookie values. The
> value needs to be quoted for this to work. Tomcat will do this
> automatically if necessary.
>
> Mark
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to