java.lang.IllegalArgumentException: Control character in cookie value

Solution Verified - Updated -

Issue

  • You are assigning values to a version 0 cookie and you see the following in your server.log:

    INFO  [STDOUT] java.lang.IllegalArgumentException: Control character in cookie value, consider BASE64 encoding your value 
            at org.apache.tomcat.util.http.ServerCookie.maybeQuote2(ServerCookie.java:368) 
            at org.apache.tomcat.util.http.ServerCookie.maybeQuote2(ServerCookie.java:361) 
            at org.apache.tomcat.util.http.ServerCookie.appendCookieValue(ServerCookie.java:271) 
            at org.apache.catalina.connector.Response.addCookieInternal(Response.java:994) 
            at org.apache.catalina.connector.Response.addCookie(Response.java:963) 
            at org.apache.catalina.connector.ResponseFacade.addCookie(ResponseFacade.java:343) 
            at atg.servlet.DynamoHttpServletResponse.addCookie(DynamoHttpServletResponse.java:1250)
    

Environment

  • JBoss Enterprise Application Platform
    • 4.3.0.GA_CP10

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content