servlets - socket timeout in android app from jetty 9 -


my android app sends http request servlet on jetty server , receives response. worked fine in jetty 6.1.26. works fine in jetty 7.6.13( uses servlet-api-2.5.jar) , jetty 8.1.15( uses servlet-api-3.0.jar) when deploy exact same servlet jetty 9.1.5.v20140505(which uses servlet-api-3.1.jar) on same machine, results in socket timeout in android app. use java jre1.7.0_55.

in android app, connection timeout 3000 , socket timeout 5000. if increase socket timeout 30,000, makes no difference. if set 40,000 works.

any idea what's going on? why android code take time accept servlet response jetty 9?

removing response.setcontentlength() in servlet resolved issue. sending 30 characters response, had set length 1024. guess android app expecting more data looking @ length set in response, waits till kind of timeout happens. apparently, servlet 3.1 in jetty 9 behaves differently previous versions.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -