Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2006

    Question Series 40 SocketConnection - http chunked decoding

    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?

  2. #2
    Registered User
    Join Date
    May 2006

    Re: Series 40 SocketConnection - http chunked decoding


    I've investigated this futher. After reading the first chunk (ie. on subsequent calls to InputStream.read()) it appears that the stream is reading from the wrong buffer.

    Calls to read() continues to return bytes and never reaches EOF. When I dumped the bytes to the display it looks like the stream is reading from other memory on the device. I believe this is the case because of hints in the data dump. I see strings like "Nokia Sans Title SemiBold" and "S40 Copyright .2001. Nokia Corporation. All rights reserved."

    Very suspicious... any hints?

Similar Threads

  1. Replies: 2
    Last Post: 2006-10-06, 17:24
  2. Issue in using HTTP client framework on series 60 SDK
    By nkhanna1979 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-11-25, 06:33
  3. Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working
    By mattbee in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-10, 11:43
  4. Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug?
    By kauppi in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2003-04-07, 09:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts