jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: Cactus 1.5 and WebRequest.addCookie(String, String) ?
Date Mon, 26 Jan 2004 13:06:40 GMT
Hi Geert,

Your problem seems to come from HttpClient. They were some bugs which
they have fixed in their RC2 version. I guess you could try to use the
same httplient jar that you were previously using (not sure if there are
incompatibilities or not). Alternatively, I would recommend sending an
email to the commons-httpclient-dev mailing list, asking them for help.
They're very reactive and should be able to help you in a snap.


> -----Original Message-----
> From: Geert Engels [mailto:geert@inceptor.com]
> Sent: 26 January 2004 13:41
> To: cactus-user@jakarta.apache.org
> Subject: Cactus 1.5 and WebRequest.addCookie(String, String) ?
> Hi,
> I have been using Cactus-13-1.4.1 + httpclient (nightly drop from
> 21-04-2002) for a long time now, and been very happy with it.
> Last week, I upgraded to Cactus-13-1.5 + httpclient 2.0RC3, and
> noticed that some unit tests which have been working great for 6
> months or more suddenly started failing consistently.
> What all these tests have in common is that they depend on setting
> cookies through WebRequest.addCookie(String, String).  Somehow the
> cookies are no longer making it to the serverside instance of the
> test.
> I tried various things, including setting the cookie domain
> explicitly, but no luck.
> Switching on debug output for cactus and httpclient revealed that
> httpclient no longer deemed the cookies worthy of transfer.
> I added some extra debug code to httpclient, and was able to see that
> org.apache.commons.httpclient.cookie.CookieSpecBase.java:462, the
> with signature:
> 	public boolean match(String host, int port, String path, boolean
> secure, final Cookie cookie)
> returns false, contrary to my expectations.  More specifically, it is
> the pathMatch portion of the test that fails.
> In that pathMatch, the following are being compared:
> 	path={/cactus/ServletRedirector}
> 	cookie.getPath()={/cheap}
> The "/cheap" is part of the request I'm trying to make, set up through
> WebRequest.setURL().  But the "/cactus/ServletRedirector" part, is
> not something that is internal to Cactus and should be totally
> transparent to my test code ?
> In any event, I did not have this problem with prior cactus/httpclient
> versions.
> I went through the mailing list archives, but could find only one
> reference to cookie problems, which was a question without reply:
> Any help would be very much appreciated.
> Thanks,
> Geert Engels.
> VP of Product Development
> Inceptor, Inc.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org

View raw message