From: David D.K. <ddk...@ki...> - 2005-01-17 14:19:03
|
Actually, I've run into web sites that won't parse cookies properly when each cookie is sent in its own header. (They usually look at the first Cookie header and ignore the rest.) The commons-httpclient library has a makeStrict() method on the HttpClientParams class that forces cookies to be sent in one header (among other things). http://jakarta.apache.org/commons/httpclient/3.0/apidocs/org/apache/ commons/httpclient/params/HttpClientParams.html#makeStrict() I've attached a patch that "fixes" this, although I don't think it's a good final solution. IMO, htmlunit should have an API that allows this setting to be turned on and off (perhaps on WebClient?). Dave On Jan 17, 2005, at 2:00 AM, Marc Guillemot wrote: > In fact there are different "types" of cookie transmission. Sending > them as different headers could/should be ok too. I think that this is > a bug of HttpClient.addRequestHeader: as the method name is > "addRequestHeader" and not "setRequestHeader", it should allow to set > many headers with the same name. > > Marc. |