2

It's driving me crazy. I created an Android App that does REST requests to an Apache Server running CakePHP 2.X.

  • In Android side: the request are make using Volley from Google it's HEAD version.
  • In Server side: It's a Apache 2, PHP 5.4, CakePHP 2.x and SSL.

Whatever request method GET or POST, with the same URL or same parameters when POST, sometimes the response is fine others time I get com.android.volley.NoConnectionError: java.net.ProtocolException: Unexpected status line: 10380HTTP/1.1 200 OK

When the error happen, the only thing i noticed is the number before changes.

10380HTTP/1.1 200 OK
.

Any idea? Thanks

I could sniff the request/response and could confirm it's a server side issue.

stack trace

enter image description here

betorcs
  • 2,771
  • 22
  • 28
  • 2
    Looks like garbage from the preceding HTTP response. Maybe somebody tries transfer-encoding: chunked and doesn't get it right? – Julian Reschke Aug 12 '15 at 14:19
  • I think so.. but it'd be always a number, may be a size/length information? – betorcs Aug 12 '15 at 14:33
  • 1
    Unfortunately I doubt anyone will be able to answer your question - the best you can do is try to determine where `10380` comes from, or what it means. Borked chunked encoding indeed sounds like a viable cause [here's another similar question](http://stackoverflow.com/questions/31754298/cakephp-http-header-is-being-interpreted-as-part-of-my-static-content-js-css). – AD7six Aug 12 '15 at 15:20
  • I see, i have the application server installed in two different servers staging and production, in both happen the issue. So I guess the error is in client side. I tried get the error doing requests with cmd line cURL and JMeter, the responses were fine. Do you know another tool that I can use to test my servers? – betorcs Aug 12 '15 at 16:13

1 Answers1

0

With information from @Julian Reschke and @AD7six

Apparently it's common error when using keep-alive and the second,third,etc response was messing up.

So following the information i got from this post, the problem looks like solved (I'll keep testing it).

Community
  • 1
  • 1
betorcs
  • 2,771
  • 22
  • 28