hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <o.kalnichev...@dplanet.ch>
Subject [PATCH]: RFC 2109 & Netscape cookie specs refinements
Date Sun, 15 Dec 2002 16:19:51 GMT
Cookie specs refinement has been prompted by the problem reported by
Christopher Lenz

Changes:

- Default cookie version is back to 0. My idea to assume that cookies by
default must be treated as fully RFC 2109 compliant was ill-conceived. 

- RFC 2109 CookieSpec class is not better compliant with the
requirements of backward compatibility stated in the section 10
("Historical") of the RFC 2109. The code got uglier though :-(

- Better Netscape draft compliance (for history inclined)

- Minor API refinements

- More test cases


Feedback, critique is welcome

Oleg


On Fri, 2002-12-13 at 08:54, Christopher Lenz wrote:
> Hi all,
> 
> we're having another problem with Cactus & HttpClient (mucho thanks for
> so quickly fixing the last one, BTW):
> 
> http://cvs.apache.org/builds/gump/latest/jakarta-cactus-sample-servlet-12.html
>      (Test against Tomcat 3.x)
> 
> http://cvs.apache.org/builds/gump/latest/jakarta-cactus-sample-servlet-13.html
>      (Test against Tomcat 4.x)
> 
> The relevant source is here:
> 
> http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-cactus/sample-servlet/src/unit/share/org/apache/cactus/unit/TestServletTestCase2.java?rev=HEAD&content-type=text/plain
>      (Method testCookieEncoding)
> 
> To summarize, Cactus is using HttpClient to include a cookie with the
> request, the cookie being named "testpass" with a value "usr&pwd". It is
> expecting to get a corresponding cookie value on the server side, but
> something is screwed up: the value returned by the servlet container
> actually contains the double quotes, but Cactus is expecting (correctly,
> IMHO), just the value.
> 
> Now, I'm not sure who's wrong here: Tomcat (both 3.x and 4.x) or
> HttpClient. Or maybe, do we need to explicity choose a different
> CookieSpec implementation that is compliant with the Servlet API?
> 
> If someone who has more knowledge about cookies could shed some light on
> this, that'd be great :-)
-- 
Oleg Kalnichevski <o.kalnichevski@dplanet.ch>

Mime
View raw message