Note that there are some explanatory texts on larger screens.

plurals
  1. POduplicate requests from HttpClient
    primarykey
    data
    text
    <p>I am using HttpClient 4.0.1 on android... I make a POST request with a header set that is the current millis... I see that request hit the server twice within a few millis (5-10) of each other.. but the header I set is the same for both requests. This happens very sporadically... I see no real difference between the requests in wireshark... I just have no clue how this could be happening. Anyone run into this before or have any tips on how to further debug it? </p> <p>here is the code I use to create the client:</p> <pre><code>public static HttpClient getAndroidHttpClient(final int timeOut) { // set up the schemas SchemeRegistry schemeRegistry = new SchemeRegistry(); schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80)); schemeRegistry.register(new Scheme("https", new EasySSLSocketFactory(), 443)); // set up our params HttpParams params = new BasicHttpParams(); params.setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, timeOut); params.setIntParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, timeOut); params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT, timeOut); params.setLongParameter(ConnManagerPNames.TIMEOUT, timeOut); params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 1); params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, new ConnPerRouteBean(1)); params.setParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, false); HttpProtocolParams.setUserAgent(params, "android-client-v1.0"); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, "utf8"); ThreadSafeClientConnManager conman = new ThreadSafeClientConnManager(params, schemeRegistry); DefaultHttpClient defaultHttpClient = new DefaultHttpClient(conman, params); return defaultHttpClient; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload