Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 19668 invoked from network); 19 Jan 2009 14:29:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jan 2009 14:29:41 -0000 Received: (qmail 67305 invoked by uid 500); 19 Jan 2009 14:29:39 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 67272 invoked by uid 500); 19 Jan 2009 14:29:39 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 67261 invoked by uid 99); 19 Jan 2009 14:29:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jan 2009 06:29:39 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [217.150.250.44] (HELO ok2consulting.nine.ch) (217.150.250.44) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jan 2009 14:29:30 +0000 Received: by ok2consulting.nine.ch (Postfix, from userid 1002) id 6EA5A198566; Mon, 19 Jan 2009 15:29:09 +0100 (CET) Received: from [10.14.85.135] (unknown [213.55.131.1]) by ok2consulting.nine.ch (Postfix) with ESMTP id C5F68198560 for ; Mon, 19 Jan 2009 15:29:03 +0100 (CET) Subject: Re: Redirect Error From: Oleg Kalnichevski To: HttpClient User Discussion In-Reply-To: <200901161527.37142.roger.varley@googlemail.com> References: <200901161527.37142.roger.varley@googlemail.com> Content-Type: text/plain Date: Mon, 19 Jan 2009 15:28:20 +0100 Message-Id: <1232375300.12412.14.camel@ubuntu> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on ok2consulting.nine.ch X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.3 On Fri, 2009-01-16 at 15:27 +0200, Roger Varley wrote: > Hi > > I'm using httpclient 3.1 indirectly through htmlunit. I believe that > httpclient is used for managing the connection and data transmission. If I'm > incorrect please forgive me and ignore me :) > > I'm sending a GET request and the remote site is sending a 302 response and a > re-direct address in the form > http://remotesite.com/exprod/search/../servlet?t=350&manual.html. When I do > this manually through Firefox and look at whats happening through the > LiveHTTPHeader plugin, I can see the 302 response code and the URL coming in. > Firefox redirects to an amended url > http://remotesite.com/exprod/servlet?t=350&manual.html and gets a 200 response > and the document manual.html > > HttpClient is not "fixing" the URL and is retransmitting > http://remotesite.com/exprod/search/../servlet?t=350&manual.html which results > in a 404 error. > > Is this a bug or expected behaviour? What do I need to do to get around this > problem? > Yes, this is expected behavior. HttpClient is not supposed to 'fix' location URLs. It is not a browser. With 4.0 API one can easily override the default behavior, though. Oleg > Regards > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > For additional commands, e-mail: httpclient-users-help@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org