Hi,

I am developing the server program for login process,
I set the cookie with "domain" and "path", but the keyword 
is not the format that the client expected.

Cookie were set by this way :
        Cookie cookie = new Cookie("ticket", value);
        cookie.setMaxAge(age);
        cookie.setDomain("test.hostname.xxx");
        cookie.setPath("/");
I hope it will be as the following format in the head of response:
Set-Cookie: ticket=53vt5whj61.ajp12tis21;domain=test.hostname.xxx;expires=Sat, 
12-Apr-2070 13:56:49 GMT;path=/

but all of the keywords are in capital, 
Set-Cookie: ticket=53vt5whj61.ajp12tis21;Domain=test.hostname.xxx;Expires=Sat, 
12-Apr-2070 13:56:49 GMT;Path=/

The client program received this by the response and set "Domain" as another cookie in 
the next request,
But tomcat doesnt't accept it, an exception occured:
--------------------------------------------
java.lang.IllegalArgumentException: Cookie name Domain is a reserved token

For some reason the client cannot be changed, does any one know how to solve this 
problem?
I refered the documents about HTTP Cookie, the keyword is "domain" , not "Domain".
Why it was written as "Domain" by Tomcat?

Any help will be appreciate.

Regards,
Huimin Wang





--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to