We are writing an application that creates a persistent socket connection to a web server. The application sends and receives HTTP chunked encoded blocks. This works nicely for Series 60, Series 80 and Sony-Ericsson devices. Series 40 however is presenting a problem.
The application opens a SocketConnection to the server and writes the HTTP headers and the request. It then reads the HTTP response headers and the first chunk. The problem is that the second chunk always fails to be read because the HTTP chunk length cannot be determined. That is, it appears that there is garbage on the stream after the first chunk. This extra data doesn't exist using other devices so it must be the Series 40. We have tried both 2nd and 3rd edition Series 40 devices with the same behaviour.
Is this a known issue? Is there a way to skip past this unknown data to get to the next chunk?