On Tue, 2008-10-21 at 08:52 +0200, Reinhard Pagitsch wrote: > Hello Oleg, > > Please can you tell me how I have to implement this custom CookieSpec? I > am not really a Java programmer. The code I have is from a customer > who uses our Webserver with HttpClient, so I can tell him what he can do > in the meantime (until he will get a fix from us). > > Thank you, > Reinhard >
You need to implement this interface http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/cookie/CookieSpec.html or subclass CookieSpecBase and override #formatCookie* methods http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/cookie/CookieSpecBase.html and then instruct HttpClient to use that custom spec as described here http://hc.apache.org/httpclient-3.x/cookies.html Oleg > Oleg Kalnichevski wrote: > > On Mon, 2008-10-20 at 09:17 +0200, Reinhard Pagitsch wrote: > > > Hello to all, > > > > > > From our webserver I get a session cookie in the form > > > POSESSIONID="dfgsdfgsdg=" > > > But the HTTPClient sends back the cookie in the form > > > POSESSIONID=dfgsdfgsdg=. > > > Therefore no authentication is done. Is there a way to configure the > > > HttpClient to send back > > > the session cookie as it is and do no modifications? > > > > > > Thank you, > > > Reinhard > > > > > > > Reinhard, > > > > You have two options > > (1) fix the broken server side script > > (2) implement a custom CookieSpec that formats cookies in the way > > compatible with the broken server side script > > > > Oleg > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
