axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerry Gao" <gjyal...@hotmail.com>
Subject Tip for cookie in AXIS 1.2.1
Date Sat, 18 Jun 2005 02:58:46 GMT
Hi guys,

Here is tip for you who use cookie in AXIS.

Axis 1.2.1 has a simple cookie mechanism (compare to RFC2965) which already supports multiple
cookies. As far as I know, there is still a cookie compatible problem. The HTTPSender and
CommonsHTTPSender send multiple cookies in this format:
    Cookie: a=a1
    Cookie: b=b2
    Cookie: c=c3
or
    Cookie2: a=a1
    Cookie2: b=b2
    Cookie2: c=c3

But according to RFC2965, the multiple cookies should be sent to server in this format:
    Cookie: a=a1;b=b2;c=c3

I think most of HTTP server can handle both formats, but some does not. (My http server +
 siteminder do not support the first format.)

Fortunately, commons-httpclient has a parameter to help us with the latter format. Use this:
    DefaultHttpParams.getDefaultParams().setBooleanParameter(
       HttpMethodParams.SINGLE_COOKIE_HEADER,
       true);
will force httpclient baking the multiple cookies into a single cookie header.

Reference: http://htmlunit.sourceforge.net/phpwiki/index.php/SingleCookieHeader

Gerry

Mime
View raw message