You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/03/19 21:20:03 UTC
DO NOT REPLY [Bug 18161] New: -
ServerCookie class is throwing an exception based on a cookie value
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18161>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18161
ServerCookie class is throwing an exception based on a cookie value
Summary: ServerCookie class is throwing an exception based on a
cookie value
Product: Tomcat 4
Version: 4.1.18
Platform: All
OS/Version: Linux
Status: NEW
Severity: Critical
Priority: Other
Component: Connector:Other
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: stephen.jackson@nielsenmedia.com
A 3rd party vendor is assigning a cookie to the request and
org.apache.coyote.tomcat4.CoyoteResponseFacade
is throwing the exception below.
As an "on the fly" fix I modified the maybeQuote to the following and it now is
working correctly.
public static void maybeQuote (int version, StringBuffer buf,
String value)
{
// special case - a \n or \r shouldn't happen in any case
if ( isToken (value))
buf.append (value);
else {
// if(version==0)
// throw new IllegalArgumentException( value );
// else {
buf.append ('"');
buf.append (value);
buf.append ('"');
// }
}
}
// log
static final int dbg=1;
public static void log(String s ) {
System.out.println("ServerCookie: " + s);
}
}
java.lang.IllegalArgumentException: 0111111English&m%2Fd%2Fyy&%2E&,&,
at
org.apache.tomcat.util.http.ServerCookie.maybeQuote(ServerCookie.java:315)
at
org.apache.tomcat.util.http.ServerCookie.appendCookieValue(ServerCookie.java
:248)
at
org.apache.coyote.tomcat4.CoyoteResponse.addCookie(CoyoteResponse.java:864)
at
org.apache.coyote.tomcat4.CoyoteResponseFacade.addCookie(CoyoteResponseFacad
e.java:278)
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org