manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wright <>
Subject Expect-continue doesn't seem operative using 4.3.x builder structures
Date Wed, 21 May 2014 12:52:19 GMT
Hi Oleg,

A few months back, if you will recall, I ported much of ManifoldCF to use
the HttpClient 4.3 builder structures for its various connectors.

Unfortunately, one thing we'd previously fixed came unfixed when I did
this.  We have a user who has a site that is being posted to that requires
basic auth.  We were getting an exception with HttpClient 4.2 having to do
with non-repeatable request entities.  We solved that by turning on

For 4.3, we still have expect-continue on, but now we are getting similar


Caused by: org.apache.http.client.NonRepeatableRequestException:
Cannot retry request with a non-repeatable request entity.
	at org.apache.http.impl.execchain.MainClientExec.execute(
	at org.apache.http.impl.execchain.ProtocolExec.execute(
	at org.apache.http.impl.execchain.RedirectExec.execute(
	at org.apache.http.impl.client.InternalHttpClient.doExecute(

The code used to set up HttpClient looks like this:

    RequestConfig.Builder requestBuilder = RequestConfig.custom()

      HttpClientBuilder clientBuilder = HttpClients.custom()
        .setRedirectStrategy(new DefaultRedirectStrategy())
        .setRequestExecutor(new HttpRequestExecutor(socketTimeout))

    if (userID != null && userID.length() > 0 && password != null)
      CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
      Credentials credentials = new
UsernamePasswordCredentials(userID, password);
      if (realm != null)
AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT, realm),
        credentialsProvider.setCredentials(AuthScope.ANY, credentials);


    HttpClient localClient =;

Wire logs show *no* expect/continue at all taking place.  Can you tell
me what we are doing wrong?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message