title: httpclient.execute() hangs when server is deployed to GAE
body: <p>I have a problem calling a servlet from my Android app when the server is deployed to App Engine. 
  The call works fine with the local server but when I deploy it, the call just hangs or throws a SocketTimeoutException if I set a timeout for the httpclient.
  At the moment my servlet does nothing (so there is no way it could be taking too much time to do its work).</p>
  
  <p>The code I'm using</p>
  
  <pre><code>HttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(SERVER_URL+"/fileupload");
  InputStreamEntity reqEntity = new InputStreamEntity(stream, 1000);
  httppost.setEntity(reqEntity);
  HttpResponse response = httpclient.execute(httppost);
  if (response.getStatusLine().getStatusCode() == 200) {
                      // file uploaded successfully!
                          Log.e("ok","resp "+response.getStatusLine().getStatusCode());
                      } else {
                          Log.e("runtime exp","couldn't handle req"+response.getStatusLine().getStatusCode());
                          throw new RuntimeException("server couldn't handle request");
                      }
  </code></pre>
  
  <p>What I want to know is what could possibly make this code run fine on localhost but not when the server is deployed to App Engine. 
  Any input is appreciated. Thanks</p>