commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <>
Subject [HttpClient] Still problems with null domains and paths
Date Thu, 21 Mar 2002 23:13:10 GMT

The Cactus build is breaking again. The error is that Cactus allows the
user to create cookies with no domain and/or no path. This seems to be
allowed by the spec (RFC 2109) :

   set-cookie      =       "Set-Cookie:" cookies
   cookies         =       1#cookie
   cookie          =       NAME "=" VALUE *(";" cookie-av)
   NAME            =       attr
   VALUE           =       value
   cookie-av       =       "Comment" "=" value
                   |       "Domain" "=" value
                   |       "Max-Age" "=" value
                   |       "Path" "=" value
                   |       "Secure"
                   |       "Version" "=" 1*DIGIT

[...]Each cookie begins with a NAME=VALUE pair, followed by zero or more
semi-colon-separated attribute-value pairs. The syntax for
attribute-value pairs was shown earlier. The specific attributes and the
semantics of their values follows. The NAME=VALUE attribute- value pair
must come first in each cookie. The others, if present, can occur in any
order [...]

However the method Cookie.createCookieHeader(...) does not allow for
null domains and paths.

Thus, when I call in cactus :

Header cookieHeader =
    HttpClientHelper.getDomain(theRequest, theConnection),
    HttpClientHelper.getPath(theRequest, theConnection),

where httpclientCookies is an array of cookies with no path nor domain,
the Cookie.match() code in createCookieHeader() fails and thus
createCookieHeader returns null, which is not correct according to the
spec above.

Am I missing something ? :-)


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message