On Tue, 2016-02-16 at 17:03 -0500, Karl Wright wrote: > Oh, FWIW, this is httpcomponents/httpclient 4.4.1. > Karl > >
Hi Karl What kind of request method is it? Per RFC 2616 there are certain restrictions on automatic redirects of some methods such as POST and PUT. Oleg > On Tue, Feb 16, 2016 at 4:58 PM, Karl Wright <daddy...@gmail.com> 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 > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org