title: Apache HttpClient is throwng HTTP 500s but can't reproduce in a browser
body: <p>Using <code>HttpClient</code> 4.1.3, I've written the following code:</p>
  
  <pre><code>HttpClient httpClient = HttpClientFactory.newHttpClient();
  HttpGet httpGet = new HttpGet("some/url/to/hit");
  HttpResponse httpResp = httpClient.execute(httpGet);
  int statusCode = httpResp.getStatusLine().getStatusCode();
  if(statusCode != HttpStatus.SC_OK)
      throw new Exception(/* ... */);
  </code></pre>
  
  <p>That's getting HTTP 500 responses (as found in the <code>httpResp.getStatusLine().getStatusCode()</code>) from a particular URL and throwing the exception.</p>
  
  <p>The thing is, when I go to the "failing" URL in a browser, its running perfectly fine.</p>
  
  <p>So I ask:</p>
  
  <ul>
  <li>Could <code>HttpClient</code> be timing out, short-circuiting the request-response cycle, and just giving me an HTTP 500?</li>
  <li>What else could be going on here? How is it possible for <code>HttpClient</code> to be giving me 500s when the browser is displaying the page perfectly fine for the same exact URL?</li>
  </ul>
  
  <p>Thanks in advance!</p>