title: HttpURLConnection worked fine in Android 2.x but NOT in 4.1: No authentication challenges found
body: <p>I have some typical codes which used HttpURLConnection to get a file with an URL.
  They worked fine in android 1.x and 2.x. But failed in Android 4.1!</p>
  
  <p>I searched on the web but found little similar information.
  Would anybody please help to investigate this issue?</p>
  
  <pre><code>private String mURLStr; 
  private HttpURLConnection mHttpConnection;
  
  ...
  
  url = new URL(mURLStr);
  
  ...
  
  mHttpConnection = (HttpURLConnection) url.openConnection();
  mHttpConnection.setDoOutput(true);
  mHttpConnection.setRequestMethod("GET");
  
  ...
  
  InputStream is = mHttpConnection.getInputStream();
  </code></pre>
  
  <p>The getInputStream method throws an exception:</p>
  
  <pre><code>08-01 15:56:48.856: W/System.err(13613): java.io.IOException: No authentication challenges found
  08-01 15:56:48.856: W/System.err(13613):      at libcore.net.http.HttpURLConnectionImpl.getAuthorizationCredentials(HttpURLConnectionImpl.java:427)
  08-01 15:56:48.866: W/System.err(13613):      at libcore.net.http.HttpURLConnectionImpl.processAuthHeader(HttpURLConnectionImpl.java:407)
  08-01 15:56:48.866: W/System.err(13613):      at libcore.net.http.HttpURLConnectionImpl.processResponseHeaders(HttpURLConnectionImpl.java:356)
  08-01 15:56:48.866: W/System.err(13613):      at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:292)
  08-01 15:56:48.866: W/System.err(13613):      at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:168)
  ...
  </code></pre>