I am having a strange problem when trying to read the response of an HTTPConnection object. The scenario is this:
1) App in the cellphone connects via HTTP to a webpage 2) The webpage adds some text to the response 3) The app in the cellphone tries to get all the text embedded in the HTTP Response.
If I try the code using emulators or some devices ( like motorola devices ) everything works perfect, but when trying with a live Sony Ericsson W200i I cannot read more than 57 bytes of the response. Here is the sample code:
In the emulator the result is 70 bytes total, 40 bytes in the first read and 30 bytes in the second read. In the real device the result is 70 bytes total too, but 40 bytes in the first read and only 17 bytes in the second read!!! I've tried a dozen ways of reading the response buffer (in a loop, by chunks, in one step all togheter, etc.) and always read only 57 bytes. Any idea???