I have a problem related to http POST body corruption. I got a Apache2 as web server, php as server script and the request is send by android HttpURLConnection class. Traffic is not too much, like 1 connection per second at the most time.
About the request, i have to send a json to the server, the json can be very large i.e. 50,000 bytes. I used POST method and attach the json to the request body as a parameter. However, I got corrupted request parameter(the json) like every 1000 request, php throw the exception to the server because the json cannot be parsed (json corrupted, i have print out the json and found that the json is truncated from a random position).
In my case I used default content type(text/plain) in the request, is this necessary to change it to text/json? I have tried switch to HttpClient from HttpURLConection and its not helping.
Have any body experienced this before? It is grateful if someone can help.