You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Papillon <le...@wanadoo.fr> on 2004/02/01 14:55:22 UTC

Tomcat 5.0.18 : Bad Cookie Names, the return ?

I've installed Tomcat 5.0.18 (binary release) and J2SE v 1.4.2_02 on a
windows server 2000 OS.

When Tomcat receive a request (or respond ?) I have pratically each time
this type of error :

23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies
GRAVE: Bad Cookie Name: expires /Value: Fri
java.lang.IllegalArgumentException: Le nom de cookie "expires" est un
"token" rÚservÚ
        at javax.servlet.http.Cookie.<init>(Cookie.java:185)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.parseCookies(CoyoteAdapter.java:424)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:
332)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:204)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:700)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
        at java.lang.Thread.run(Thread.java:534)

another one (cookie's name is different...)

23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies
GRAVE: Bad Cookie Name: path /Value: /
java.lang.IllegalArgumentException: Le nom de cookie "path" est un "token"
rÚservÚ
        at javax.servlet.http.Cookie.<init>(Cookie.java:185)
        ....
        at java.lang.Thread.run(Thread.java:534)

I've undestand that "path","expire","domain",etc are reserved names for
cookies. All run fine with the same classes on an "oldest" tomcat
version(3.3 who seems to have and similary corrected bug and or a tomcat
4.0.x) or when I copy the complete context (Tomcat 5 rep and Java rep) on
anothers machines (windows 2000 pro or Mac OS X).

    A difference between the server and the computers : The server is behind
a firewall and have two adress. All accesses are done by the WAN adress
because using NAT.

thanks for any informations, any help, any idea ;)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.0.18 : Bad Cookie Names, the return ?

Posted by Papillon <le...@wanadoo.fr>.
You're right :
    - No errors when I use http://localhost/appli/servlet/...
    - Yes, Burp proxy is really cool :

HTTP/1.1 200 OK
pragma: no cache
Set-Cookie: JSESSIONID=9AD....F1; Path=/appli
Set-Cookie: MySession=vCookies
Content-Type: text/html
...

When the browser send the next request "Path" cookie is missing. Only
JSESSIONID (phew !!!) and MySession is send :

Cookie: MySession=vCookies; JSESSIONID=9AD....F1

Watching the error about "Path" in the Tomcat Traces :
23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies
GRAVE: Bad Cookie Name: path /Value: /

Why only the "/" appear and not "/appli" ?

Thanks a lot for your help
Best regards 

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: lundi 2 février 2004 18:24
To: 'Tomcat Users List'
Subject: RE: Tomcat 5.0.18 : Bad Cookie Names, the return ?

Do you get this error when you try to access the webapp inside of your
firewall?

For example, on the Win2K server itself with http://localhost:80/.  

Sorry I cannot be much of help there since we use a different network setup,
and Apache-Tomcat combo. 

Speaking of sniffer, I found Burp proxy really cool. 

-----Original Message-----
From: Papillon [mailto:leakim@wanadoo.fr]
Sent: Monday, February 02, 2004 2:59 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 5.0.18 : Bad Cookie Names, the return ?


Thanks a lot for your answer.
I'm using Tomcat-StandAlone (port 80)
So, I don't have this type of problems on anothers computers with the same
classes and jsdk.
I have used a sniffer and all cookies seems to have an argument. I will
retry and be carefull on this point.

Best regards

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: lundi 2 février 2004 17:44
To: 'Tomcat Users List'
Subject: RE: Tomcat 5.0.18 : Bad Cookie Names, the return ?

Take a look at your request header(or response hearder).  In this case, it's
more likely to be the request.  You are trying to set a cooking with no
argument, you web container will throw an IllegalArgumentException. The
syntax for cookie in request header:

	Cookie: NAME1=OPAQUE_STRING1; NAME2=OPAQUE_STRING2 ...

Btw, do you use Tomcat-StandAlone or with Apache?  

-----Original Message-----
From: Papillon [mailto:leakim@wanadoo.fr]
Sent: Sunday, February 01, 2004 6:55 AM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.0.18 : Bad Cookie Names, the return ?


I've installed Tomcat 5.0.18 (binary release) and J2SE v 1.4.2_02 on a
windows server 2000 OS.

When Tomcat receive a request (or respond ?) I have pratically each time
this type of error :

23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies
GRAVE: Bad Cookie Name: expires /Value: Fri
java.lang.IllegalArgumentException: Le nom de cookie "expires" est un
"token" rÚservÚ
        at javax.servlet.http.Cookie.<init>(Cookie.java:185)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.parseCookies(CoyoteAdapter.java:424)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:
332)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:204)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:700)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
        at java.lang.Thread.run(Thread.java:534)

another one (cookie's name is different...)

23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies
GRAVE: Bad Cookie Name: path /Value: /
java.lang.IllegalArgumentException: Le nom de cookie "path" est un "token"
rÚservÚ
        at javax.servlet.http.Cookie.<init>(Cookie.java:185)
        ....
        at java.lang.Thread.run(Thread.java:534)

I've undestand that "path","expire","domain",etc are reserved names for
cookies. All run fine with the same classes on an "oldest" tomcat
version(3.3 who seems to have and similary corrected bug and or a tomcat
4.0.x) or when I copy the complete context (Tomcat 5 rep and Java rep) on
anothers machines (windows 2000 pro or Mac OS X).

    A difference between the server and the computers : The server is behind
a firewall and have two adress. All accesses are done by the WAN adress
because using NAT.

thanks for any informations, any help, any idea ;)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.0.18 : Bad Cookie Names, the return ?

Posted by Yansheng Lin <ya...@silvacom.com>.
Do you get this error when you try to access the webapp inside of your firewall?

For example, on the Win2K server itself with http://localhost:80/.  

Sorry I cannot be much of help there since we use a different network setup, and
Apache-Tomcat combo. 

Speaking of sniffer, I found Burp proxy really cool. 

-----Original Message-----
From: Papillon [mailto:leakim@wanadoo.fr] 
Sent: Monday, February 02, 2004 2:59 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 5.0.18 : Bad Cookie Names, the return ?


Thanks a lot for your answer.
I'm using Tomcat-StandAlone (port 80)
So, I don't have this type of problems on anothers computers with the same
classes and jsdk.
I have used a sniffer and all cookies seems to have an argument. I will
retry and be carefull on this point.

Best regards

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: lundi 2 février 2004 17:44
To: 'Tomcat Users List'
Subject: RE: Tomcat 5.0.18 : Bad Cookie Names, the return ?

Take a look at your request header(or response hearder).  In this case, it's
more likely to be the request.  You are trying to set a cooking with no
argument, you web container will throw an IllegalArgumentException. The
syntax for cookie in request header:

	Cookie: NAME1=OPAQUE_STRING1; NAME2=OPAQUE_STRING2 ...

Btw, do you use Tomcat-StandAlone or with Apache?  

-----Original Message-----
From: Papillon [mailto:leakim@wanadoo.fr]
Sent: Sunday, February 01, 2004 6:55 AM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.0.18 : Bad Cookie Names, the return ?


I've installed Tomcat 5.0.18 (binary release) and J2SE v 1.4.2_02 on a
windows server 2000 OS.

When Tomcat receive a request (or respond ?) I have pratically each time
this type of error :

23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies
GRAVE: Bad Cookie Name: expires /Value: Fri
java.lang.IllegalArgumentException: Le nom de cookie "expires" est un
"token" rÚservÚ
        at javax.servlet.http.Cookie.<init>(Cookie.java:185)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.parseCookies(CoyoteAdapter.java:424)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:
332)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:204)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:700)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
        at java.lang.Thread.run(Thread.java:534)

another one (cookie's name is different...)

23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies
GRAVE: Bad Cookie Name: path /Value: /
java.lang.IllegalArgumentException: Le nom de cookie "path" est un "token"
rÚservÚ
        at javax.servlet.http.Cookie.<init>(Cookie.java:185)
        ....
        at java.lang.Thread.run(Thread.java:534)

I've undestand that "path","expire","domain",etc are reserved names for
cookies. All run fine with the same classes on an "oldest" tomcat
version(3.3 who seems to have and similary corrected bug and or a tomcat
4.0.x) or when I copy the complete context (Tomcat 5 rep and Java rep) on
anothers machines (windows 2000 pro or Mac OS X).

    A difference between the server and the computers : The server is behind
a firewall and have two adress. All accesses are done by the WAN adress
because using NAT.

thanks for any informations, any help, any idea ;)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.0.18 : Bad Cookie Names, the return ?

Posted by Papillon <le...@wanadoo.fr>.
Thanks a lot for your answer.
I'm using Tomcat-StandAlone (port 80)
So, I don't have this type of problems on anothers computers with the same
classes and jsdk.
I have used a sniffer and all cookies seems to have an argument. I will
retry and be carefull on this point.

Best regards

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: lundi 2 février 2004 17:44
To: 'Tomcat Users List'
Subject: RE: Tomcat 5.0.18 : Bad Cookie Names, the return ?

Take a look at your request header(or response hearder).  In this case, it's
more likely to be the request.  You are trying to set a cooking with no
argument, you web container will throw an IllegalArgumentException. The
syntax for cookie in request header:

	Cookie: NAME1=OPAQUE_STRING1; NAME2=OPAQUE_STRING2 ...

Btw, do you use Tomcat-StandAlone or with Apache?  

-----Original Message-----
From: Papillon [mailto:leakim@wanadoo.fr]
Sent: Sunday, February 01, 2004 6:55 AM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.0.18 : Bad Cookie Names, the return ?


I've installed Tomcat 5.0.18 (binary release) and J2SE v 1.4.2_02 on a
windows server 2000 OS.

When Tomcat receive a request (or respond ?) I have pratically each time
this type of error :

23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies
GRAVE: Bad Cookie Name: expires /Value: Fri
java.lang.IllegalArgumentException: Le nom de cookie "expires" est un
"token" rÚservÚ
        at javax.servlet.http.Cookie.<init>(Cookie.java:185)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.parseCookies(CoyoteAdapter.java:424)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:
332)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:204)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:700)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
        at java.lang.Thread.run(Thread.java:534)

another one (cookie's name is different...)

23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies
GRAVE: Bad Cookie Name: path /Value: /
java.lang.IllegalArgumentException: Le nom de cookie "path" est un "token"
rÚservÚ
        at javax.servlet.http.Cookie.<init>(Cookie.java:185)
        ....
        at java.lang.Thread.run(Thread.java:534)

I've undestand that "path","expire","domain",etc are reserved names for
cookies. All run fine with the same classes on an "oldest" tomcat
version(3.3 who seems to have and similary corrected bug and or a tomcat
4.0.x) or when I copy the complete context (Tomcat 5 rep and Java rep) on
anothers machines (windows 2000 pro or Mac OS X).

    A difference between the server and the computers : The server is behind
a firewall and have two adress. All accesses are done by the WAN adress
because using NAT.

thanks for any informations, any help, any idea ;)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.0.18 : Bad Cookie Names, the return ?

Posted by Yansheng Lin <ya...@silvacom.com>.
Take a look at your request header(or response hearder).  In this case, it's
more likely to be the request.  You are trying to set a cooking with no
argument, you web container will throw an IllegalArgumentException. The syntax
for cookie in request header:

	Cookie: NAME1=OPAQUE_STRING1; NAME2=OPAQUE_STRING2 ...

Btw, do you use Tomcat-StandAlone or with Apache?  

-----Original Message-----
From: Papillon [mailto:leakim@wanadoo.fr] 
Sent: Sunday, February 01, 2004 6:55 AM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.0.18 : Bad Cookie Names, the return ?


I've installed Tomcat 5.0.18 (binary release) and J2SE v 1.4.2_02 on a
windows server 2000 OS.

When Tomcat receive a request (or respond ?) I have pratically each time
this type of error :

23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies
GRAVE: Bad Cookie Name: expires /Value: Fri
java.lang.IllegalArgumentException: Le nom de cookie "expires" est un
"token" rÚservÚ
        at javax.servlet.http.Cookie.<init>(Cookie.java:185)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.parseCookies(CoyoteAdapter.java:424)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:
332)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:204)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:700)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
        at java.lang.Thread.run(Thread.java:534)

another one (cookie's name is different...)

23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies
GRAVE: Bad Cookie Name: path /Value: /
java.lang.IllegalArgumentException: Le nom de cookie "path" est un "token"
rÚservÚ
        at javax.servlet.http.Cookie.<init>(Cookie.java:185)
        ....
        at java.lang.Thread.run(Thread.java:534)

I've undestand that "path","expire","domain",etc are reserved names for
cookies. All run fine with the same classes on an "oldest" tomcat
version(3.3 who seems to have and similary corrected bug and or a tomcat
4.0.x) or when I copy the complete context (Tomcat 5 rep and Java rep) on
anothers machines (windows 2000 pro or Mac OS X).

    A difference between the server and the computers : The server is behind
a firewall and have two adress. All accesses are done by the WAN adress
because using NAT.

thanks for any informations, any help, any idea ;)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org