title: Android: HTTP-Request fails often and is slow
body: <p>I'm using following stupid code to download some data:</p>
  
  <pre><code>HttpClient client = new DefaultHttpClient();
  HttpGet request = new HttpGet();
  request.setURI(new URI(url));
  request.setHeader("User-Agent","Android Browser");
  HttpResponse response = client.execute(request);
  in=response.getEntity().getContent();
  len=(int)response.getEntity().getContentLength();
  if (len&lt;=0) return null;
  data=new byte[len];
  ...
  </code></pre>
  
  <p>Downloading data this way is incredibly slow and often fails with a connection timeout. The same happens on other users devices so the configuration of my network should not be the reason.</p>
  
  <p>On the other hand the given "url" works fine when I type it into a normal browser, it is fast and returns a result nearly immediately. My Android device and the "normal" computer with that browser are running on same WLAN network. So what could be wrong here?</p>