Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 84B60185A8 for ; Tue, 16 Feb 2016 22:03:12 +0000 (UTC) Received: (qmail 93948 invoked by uid 500); 16 Feb 2016 22:03:12 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 93902 invoked by uid 500); 16 Feb 2016 22:03:12 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 93890 invoked by uid 99); 16 Feb 2016 22:03:12 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Feb 2016 22:03:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id AF341C0557 for ; Tue, 16 Feb 2016 22:03:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id oqVGJZHuj-G1 for ; Tue, 16 Feb 2016 22:03:10 +0000 (UTC) Received: from mail-ig0-f173.google.com (mail-ig0-f173.google.com [209.85.213.173]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 93B605FAD8 for ; Tue, 16 Feb 2016 22:03:10 +0000 (UTC) Received: by mail-ig0-f173.google.com with SMTP id y8so1044290igp.1 for ; Tue, 16 Feb 2016 14:03:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ZgKeb5ApMDEXV8GFFldzLsMaF8b4FlPNG+Uns3NF3bA=; b=f/qpOZl3Gz+NjLMn/+6sxgYe8rUZE1ew8edn6hpxRjmUyZT26voOeBaYmdSqKpzPOW kKXOtfjiEND8ahYmhs3wgTKVi1HWTtrksHKBHvLfEeFi/jWazdLfTnufKMzhxbRfjWBC jogTNOGeJe0RvGFxQHtnyPjSMJhqeg8fhtCmuspvHB/O+BWjv/lUHFxPv2uI7Cf7+dss aYH6AsTSvHSatAsiCtJ21nvDNnd5QUZe52F+hqIx1g0xcy8rPfHtNLmpSaxEygRpcN2D uyAjiQgLKSssTeXJ51OwkY59Y1s/s2Axlmxi/GAPW7tjJOA+fbIP5qfPuSEOB6vads0/ WzYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=ZgKeb5ApMDEXV8GFFldzLsMaF8b4FlPNG+Uns3NF3bA=; b=hr9mFc3HSuD62Q7u3DRGbtJDe3GaXcwsWCZ6KElYzrzffiZZ6fnpNstrUin/6Sr3/w Nbi8BVoA8qSpEyspEbk2o+nV2+eovZOyBQt5cxSaVYtQtcBgwYxucQ0aRWWJH6f84ZG4 Nf4LcCw8J1+RDkm4jhcjbh/81wA+6WQxVN7eg4yiMWkV9gUq2bflFWdRzXDii49A/XLB chTbx759juMtefWgGbs8Q2KVDN4UbM+vkYw4JdaZHk2Qi1OiWcvhR1v1I+q8iXcYZuKy iGuvWCqhsblee22IK9V4wLHTtPEqmTtMMYYtrhfnPO6ae8fJL2XEiTeuKH4FCJwZQHKY 94Jg== X-Gm-Message-State: AG10YOQxdTJd+DR92/tC96l//APBhO3XcQ1LdnTZwG7Hm+N02wGPyihKtAt1ntH8AyxugyoPerhIO1km8zIXeQ== MIME-Version: 1.0 X-Received: by 10.50.155.5 with SMTP id vs5mr20949597igb.83.1455660184418; Tue, 16 Feb 2016 14:03:04 -0800 (PST) Received: by 10.107.134.150 with HTTP; Tue, 16 Feb 2016 14:03:04 -0800 (PST) In-Reply-To: References: Date: Tue, 16 Feb 2016 17:03:04 -0500 Message-ID: Subject: Re: Redirection not happening? From: Karl Wright To: HttpComponents Project Content-Type: multipart/alternative; boundary=001a11348e3634d1e1052bea4cfc --001a11348e3634d1e1052bea4cfc Content-Type: text/plain; charset=UTF-8 Oh, FWIW, this is httpcomponents/httpclient 4.4.1. Karl On Tue, Feb 16, 2016 at 4:58 PM, Karl Wright wrote: > Hi folks, > > The ManifoldCF SharePoint connector has the following code to set up its > HttpClient instance: > > >>>>>> > RequestConfig.Builder requestBuilder = RequestConfig.custom() > .setCircularRedirectsAllowed(true) > .setSocketTimeout(socketTimeout) > .setExpectContinueEnabled(false) > .setConnectTimeout(connectionTimeout) > .setConnectionRequestTimeout(socketTimeout); > > // If there's a proxy, set that too. > if (proxyHost != null && proxyHost.length() > 0) > { > > // Configure proxy authentication > if (proxyUsername != null && proxyUsername.length() > 0) > { > if (proxyPassword == null) > proxyPassword = ""; > if (proxyDomain == null) > proxyDomain = ""; > > credentialsProvider.setCredentials( > new AuthScope(proxyHost, proxyPort), > new NTCredentials(proxyUsername, proxyPassword, currentHost, > proxyDomain)); > } > > HttpHost proxy = new HttpHost(proxyHost, proxyPort); > > requestBuilder.setProxy(proxy); > } > > HttpClientBuilder builder = HttpClients.custom() > .setConnectionManager(connectionManager) > .disableAutomaticRetries() > .setDefaultRequestConfig(requestBuilder.build()) > .setDefaultCredentialsProvider(credentialsProvider); > builder.setRequestExecutor(new HttpRequestExecutor(socketTimeout)) > .setRedirectStrategy(new DefaultRedirectStrategy()); > httpClient = builder.build(); > <<<<<< > > This works fine for the most part, except for one thing: it apparently > doesn't follow 302 redirections, for some reason. Any idea why? > > Thanks in advance, > Karl > > --001a11348e3634d1e1052bea4cfc--