title: Apache HttpClient 3.1 socket timeout
body: <p>I'm executing webservice requests with Apache HttpClient 3.1 in the following way:</p>
  
  <pre><code>private MultiThreadedHttpConnectionManager cm = null;
  private HttpClient client = null;
  
  // Setting up connection manager during init process
  cm = new MultiThreadedHttpConnectionManager();
  int connectionTimeout = 12000; // it actually comes from config file, but this is the current value
  cm.getParams().setConnectionTimeout(connectionTimeout);
  cm.getParams().setTcpNoDelay(true);
  client = new HttpClient(cm);
  
  // method is prepared with request data earlier
  int socketTimeout = 30000; // it actually comes from config file, but this is the current value
  method.getParams().setSoTimeout(socketTimeout);
  method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(0, false));
  
  logger.info("Starting request");
  int statusCode = client.executeMethod(method);
  logger.info("StatusCode = " + statusCode);
  String response = method.getResponseBodyAsString();
  logger.info("Response = " + response);
  </code></pre>
  
  <p>The timestamps in the log file are the following:</p>
  
  <pre><code>2017-05-02 08:50:03,881 Starting request
  2017-05-02 08:50:16,680 StatusCode = 200
  2017-05-02 08:50:46,708 java.net.SocketTimeoutException
  </code></pre>
  
  <p>So even though connection timeout is set to 12 seconds, executeMethod call took almost 13 seconds. I'm confused about this, as the documentation is not clear here: is it correct to say that executeMethod and getResponseBodyAsString both use socket timeout separately? So, in this case, socket timeout is 30 seconds, so theoretically could the execution take 60 seconds to complete?</p>