title: org.apache.http.client.ClientProtocolException in HttpPost
body: <p>I try upload some string to server. When I try upload on server, in string:</p>
  
  <pre><code>        HttpResponse response = httpclient.execute(httppost);
  </code></pre>
  
  <p>I have error org.apache.http.client.ClientProtocolException. All code:</p>
  
  <pre><code>public void sendString(String stringToSend) {
  
      try {
          DefaultHttpClient httpclient = new DefaultHttpClient();
          httpclient.getCredentialsProvider().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password));
          HttpPost httppost = new HttpPost(serverAddress);
          InputStreamEntity reqEntity = new InputStreamEntity( new ByteArrayInputStream(stringToSend.getBytes()), stringToSend.length());
          reqEntity.setContentType("application/xml");
          httppost.setEntity(reqEntity);
          HttpResponse response = httpclient.execute(httppost);
          if (response.getStatusLine().getStatusCode() != org.apache.http.HttpStatus.SC_OK) {
              Log.i("SEND", "not send "+response.getStatusLine());
          }else{
              Log.i("SEND", "send ok "+response.getStatusLine());
          }
      } catch (IOException e) {
          Log.w("IOException", e.toString() +" "+ e.getMessage());
      }        
  }
  </code></pre>