Hi, All.
I'm using Cookie class included in JSDK2.1 package.
When I construct a new Cocckie object with name "comment",
"discard", ...and so on, an exception has occured.
The code of javax.servlet.http.Cookie's constructor is follows;
[javax.servlet.http.Cookie.java]
| public Cookie (String name, String value) {
| if (!isToken (name)
| || name.equalsIgnoreCase ("Comment") // rfc2019
| || name.equalsIgnoreCase ("Discard") // 2019++
| || name.equalsIgnoreCase ("Domain")
| || name.equalsIgnoreCase ("Expires") // (old cookies)
| || name.equalsIgnoreCase ("Max-Age") // rfc2019
| || name.equalsIgnoreCase ("Path")
| || name.equalsIgnoreCase ("Secure")
| || name.equalsIgnoreCase ("Version")
| ) {
| ...
| throw new IllegalArgumentException (errMsg);
| }
In RFC-2109, there is no description about not to use
"comment", "discard", ... as cookie name.
Sombody knows why these names are reserved in JSDK or
is there another specification about cookies?
[RFC-2109]
| The two state management headers, Set-Cookie and Cookie, have common
| syntactic properties involving attribute-value pairs. The following
| grammar uses the notation, and tokens DIGIT (decimal digits) and
| token (informally, a sequence of non-special, non-white space
| characters) from the HTTP/1.1 specification [RFC 2068] to describe
| their syntax.
|
| av-pairs = av-pair *(";" av-pair)
| av-pair = attr ["=" value] ; optional value
| attr = token
| value = word
| word = token | quoted-string
TIA.
=======================================================
Takayuki Tachikawa
NTT Software
Tel/Fax:045-212-8018/7948 $B!! (Bmailto:[EMAIL PROTECTED]
=======================================================
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html