title: HttpUrlConnection doesn't find the NTLM challenge on Android
body: <p>I'm trying to connect my Android app to an IIS server using the HttpUrlConnection class. </p>
  
  <p>My server needs the user to be authenticate, so it is sending the following challenge to the client :</p>
  
  <pre><code>WWW-Authenticate: Negotiate
  WWW-Authenticate: NTLM
  </code></pre>
  
  <p>My problem is that HttpUrlConnection doesn't seems to parse it. So getPasswordAuthentication() is never call,  and it return an IOException "no authentication challenges found".</p>
  
  <p>Here is my code :</p>
  
  <pre><code>Authenticator.setDefault(new Authenticator() {
      @Override
      protected PasswordAuthentication getPasswordAuthentication() {                  
  
              return new PasswordAuthentication("myUsername", "myPassword".toCharArray());
      }               
  });
  
  URL url = new URL(myUrl);               
  HttpURLConnection conn = (HttpURLConnection) url.openConnection();          
  
  conn.setRequestMethod("GET");
  conn.setRequestProperty("Accept-Encoding", "gzip");
  conn.setRequestProperty("Accept-Charset", "UTF-8");         
  conn.setRequestProperty("Accept", "*/*");
  conn.setRequestProperty("Connection", "close");
  conn.setDoOutput(true);
  conn.setDoInput(true);          
  
  try 
  {   
      conn.connect();             
      status_code = conn.getResponseCode();   
  }catch (IOException e) {
      ...             
  }
  </code></pre>
  
  <p>I'm really starting to think that NTLM challenge is just not supported by HttpUrlConnection. I saw some libraries that seems to do the work, but I would prefer not to use external libraries.</p>
  
  <p>Can somebody confirm if it is possible or not to make HttpUrlConnection handle NTLM challenge without external libs?</p>