Hi,
we have the problem, that we runs on our build/development machine many instances of java software.
Our main application, sets a cookie with this cookie name: "SessionPersistence-dev-publish,publishdev"
We can't changed this cookie name.
If I get the webfrontend of this application, e.g.:
http://<developmentmachine>.<localdomain>:4503/
Then I get a cookie with this name.
If I change now to jenkins on the same machine:
http://<developmentmachine>.<localdomain>:8080/jenkins/
then I get a blank white page.
In jenkins.log I get the following exception:
Sep 25, 2012 9:27:23 AM winstone.Logger logInternal SEVERE: Error within request handler thread java.lang.IllegalArgumentException: Cookie name contains a comma at javax.servlet.http.Cookie.setName(Cookie.java:79) at javax.servlet.http.Cookie.<init>(Cookie.java:25) at winstone.WinstoneRequest.parseCookieLine(WinstoneRequest.java:698) at winstone.WinstoneRequest.parseHeaders(WinstoneRequest.java:653) at winstone.HttpListener.parseHeaders(HttpListener.java:394) at winstone.HttpListener.parseURI(HttpListener.java:256) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:75) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
Workarounds:
1.) Access jenkins directly via IP.
2.) Delete this cookie.
Is this the desired behavior?
many regards,
Jens
[JENKINS-15296] Cookie name contains a comma, Jenkins Overview will not displayed
Resolution | New: Won't Fix [ 2 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Component/s | New: other [ 15490 ] | |
Component/s | Original: infrastructure [ 15687 ] |
Workflow | Original: JNJira [ 146019 ] | New: JNJira + In-Review [ 191745 ] |
The exception does not come from Jenkins and not from Winstone either, it comes from the servlet api as you can see in the stack-trace:
java.lang.IllegalArgumentException: Cookie name contains a comma
at javax.servlet.http.Cookie.setName(Cookie.java:79)
at javax.servlet.http.Cookie.<init>(Cookie.java:25)
In the servlet api, we can read:
"The name must conform to RFC 2109. That means it can contain only ASCII alphanumeric characters and cannot contain commas, semicolons, or white space or begin with a $ character. The cookie's name cannot be changed after creation."
See for example http://tomcat.apache.org/tomcat-7.0-doc/servletapi/javax/servlet/http/Cookie.html#Cookie%28java.lang.String,%20java.lang.String%29
In short, the cookie name in your "main application" is not compatible with RFC 2109 and with the servlet api.
I suggest to change at your side. Given that we can't change the servlet api on this side, this issue is won't fix.