Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 72190 invoked from network); 15 Dec 2004 09:21:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Dec 2004 09:21:43 -0000 Received: (qmail 66796 invoked by uid 500); 15 Dec 2004 09:13:31 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 66689 invoked by uid 500); 15 Dec 2004 09:13:30 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 66596 invoked by uid 99); 15 Dec 2004 09:13:29 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from mail21.bluewin.ch (HELO mail21.bluewin.ch) (195.186.18.66) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 15 Dec 2004 01:13:24 -0800 Received: from xbox.localdomain (62.202.80.219) by mail21.bluewin.ch (Bluewin AG 7.0.035) id 41BEB96100013FC3 for httpclient-user@jakarta.apache.org; Wed, 15 Dec 2004 09:13:21 +0000 Received: by xbox.localdomain (Postfix, from userid 1000) id 621F4B6EC6; Wed, 15 Dec 2004 10:13:13 +0100 (CET) Date: Wed, 15 Dec 2004 10:13:13 +0100 From: Oleg Kalnichevski To: HttpClient User Discussion Subject: Re: Cookie problem Message-ID: <20041215091313.GA23786@xbox.localdomain> Mail-Followup-To: HttpClient User Discussion References: <41C14B9E.3040100@interia.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41C14B9E.3040100@interia.pl> User-Agent: Mutt/1.4.2.1i X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Yes, it is. There's a (fairly ugly) way to work the problem around with HttpClient 2.0.x, however we strongly urge you to consider upgrading to HttpClient 3.0 instead. HttpClient 3.0 should go RC (release candidate) sometime in January with a final release following shortly Oleg On Thu, Dec 16, 2004 at 09:47:26AM +0100, Marcin Pi??tek wrote: > Thank you very much. > > Is that patch included to HttpClient 3.0? > > Roland Weber napisa??(a): > > >Hello Marcin, > > > >somewhere down the road, it has been made possible > >to set the cookie header manually: > >http://issues.apache.org/bugzilla/show_bug.cgi?id=24081 > > > >I think that is just what you need. > > > >cheers, > > Roland > > > > > > > > > >madey22@interia.pl > >15.12.2004 01:19 > >Please respond to > >"HttpClient User Discussion" > > > > > >To > >httpclient-user@jakarta.apache.org > >cc > > > >Subject > >Cookie problem > > > > > > > > > > > > > > > >Hello, > >I use HttpClient 2.0.2 > >I have a little problem with cookies. > >I write a servlet, to work as a kind of proxy to a different http server. > >So I take my HttpServletRequest, rewrite it's method, and header to > >a HttpClient and execute that method. > >After that, I take a response from method, rewrite header to > >HttpServletResponse and > >rewrite also a body (binary). And everythink works fine but I have a > >little problem with cookies. > >When a cookie came with header from HttpClient (Set-cookie), it is just > >rewritten to HttpServletResponse > >and I can see in my browser then that cookie with proper value. > >When I try to sent a cookie to HttpClient from HttpServletrequest: > >I know that it can't be rewritten with header (I've found that in > >archive). > >So I write: > > > >String url = "http://www.my.address.org/" > > > >HostConfiguration config = new HostConfiguration(); > >config.setHost(url, 80); > >HttpClient client = new HttpClient(); > >HttpState state = client.getState(); > >Cookie myCookie = new Cookie(url, some_name, some_value); > >state.addCookie(myCookie); > > > >PostMethod method = new PostMethod(url); //I use post and get method > >// add header, and parameters here > > > >client.executeMethod(config, method, state); > > > >and when I look at the things which where sent to the server i can see > >that there are no cookie header at all. Rest of the package looks ok > >(there is rest of the > >headers and protocol and everything as it should be). > >The name and value i take from a cookie which > >where sent to me by HttpServletRequest, and I have checked them, there are > >ok. > >What is wrong? What is the correct way to add a cookie to request? > > > >Marcin Piatek > > > >---------------------------------------------------------------------- > >Startuj z INTERIA.PL!!! >>> http://link.interia.pl/f1837 > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org > >For additional commands, e-mail: httpclient-user-help@jakarta.apache.org > > > > > > > > > > > > > -- > ------------------------------------------------------------------------------- > -- Free your code!!! > ------------------------------------------------------------------------------- > > > ---------------------------------------------------------------------- > Dzwonisz za granice? >>> http://link.interia.pl/f183f > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-user-help@jakarta.apache.org