Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 92458 invoked from network); 20 Feb 2009 22:19:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2009 22:19:00 -0000 Received: (qmail 92024 invoked by uid 500); 20 Feb 2009 22:18:59 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 92000 invoked by uid 500); 20 Feb 2009 22:18:59 -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 91989 invoked by uid 99); 20 Feb 2009 22:18:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Feb 2009 14:18:59 -0800 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.146.176] (HELO wa-out-1112.google.com) (209.85.146.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Feb 2009 22:18:50 +0000 Received: by wa-out-1112.google.com with SMTP id k22so624880waf.22 for ; Fri, 20 Feb 2009 14:18:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.92.14 with SMTP id p14mr560328wab.140.1235168306779; Fri, 20 Feb 2009 14:18:26 -0800 (PST) Date: Fri, 20 Feb 2009 14:18:26 -0800 Message-ID: <88881cea0902201418i61b192cbna4d5bb88892ae522@mail.gmail.com> Subject: How to not follow redirects? From: Scott Mueller To: httpclient-users Content-Type: multipart/alternative; boundary=00163646cbf629d4ed04636108d7 X-Virus-Checked: Checked by ClamAV on apache.org --00163646cbf629d4ed04636108d7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I need to know the redirect location of a post and I don't want to follow redirects (which it is currently doing by default). How should this be handled? I'm looking at the Javadocs and see a DefaultHttpClient.setRedirectHandler() method that takes a RedirectHandler. Should I pass in DefaultRedirectHandler overriding its isRedirectRequested(response, context) method and passing back false always? Doing that doesn't sound right as a redirect might be requested, but I just don't want to follow it... -- Scott Mueller http://www.appletree.com AppleTree - Solve the Puzzle --00163646cbf629d4ed04636108d7--