| Reply | « Previous Thread | Next Thread » |
|
Hi all ,
SE 790i hangs at inputstream.read() or datainputstream.read() Has anyone faced similar issue. i am reading chunked data in the http responses. There is no content length in the response. Transfer-Encoding header is chunked in response. Would appreciate any help. Regards Deepak |
| unread_chapter |
| View Public Profile |
| Find all posts by unread_chapter |
|
Join Date: Mar 2008
Posts: 2,161
Location: The Capital of I N D I A
raj_J2ME
Offline
Forum Nokia Champion
|
|
|
Quote:
2.How you check that... what is the response code you are getting? Thanks R a j - The K e r n e l |
|
response code is 200ok. Body is present in chunks.
Till now whatever 20-21 devices(includes nokia,motorola,samsung,sony) i have tested i face this issue only in w790i. I put a trace before is.read() and after is.read(). The trace of latter is not shown at all. Code is as below length = con.getLength(); //con is httpconnector object ByteArrayOutputStream baos = new ByteArrayOutputStream(); int b = 0; if (length != -1) { buffer = new byte[(int) length]; is.readFully(buffer); } else { while ((b = is.read()) != -1) {//Device hangs in this loop forever. baos.write(b); } buffer = baos.toByteArray(); Anyone faced this issue? Can you let know if there is any issue in above code |
| unread_chapter |
| View Public Profile |
| Find all posts by unread_chapter |
|
Join Date: Mar 2008
Posts: 2,161
Location: The Capital of I N D I A
raj_J2ME
Offline
Forum Nokia Champion
|
|||
|
Quote:
Yeah,that will off course hangs there, Can you please tell me that where you are opening the input stream.. like Quote:
I Just add this line (see inner quoted one - Blue color.. please check that whether you can processed forward after this,let me know. Thanks R a j - The K e r n e l |
|
The code was just a snippet.
I just missed it while writing on post. THe code works well in all devices(ones on which i tested) currently and does not on k790i(sorry last time mentioned w790 wrongly). The code works perfectly also on wtk emulator. Please let me know if you need any other info. Regards Deepak |
|
Join Date: Mar 2008
Posts: 2,161
Location: The Capital of I N D I A
raj_J2ME
Offline
Forum Nokia Champion
|
|
Hi,
there two ways, first There are a lot of demo examples on the web,just search and use the code... and the secondly you have to do testing and debugging for the issue you are facing...on the Device. Thanks R a j - The K e r n e l |
|
ok, i will do that .
But is there any known issue of hanging in inputstream.read() forever whenever the chunked responses are received. Please look into the below link. The same thing is happening. http://discussion.forum.nokia.com/fo...p/t-18732.html Is there any solution to handle chunked responses properly. Regards Deepak |
|
Any help would be appreciated.
Regards Deepak |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| CleanupStack::PushL(scheduler) makes new thread hanging on emulator | ababo | General Symbian C++ | 3 | 2008-06-03 13:22 |
| download routine in a separate thread to avoid app from hanging? | novis | Python | 4 | 2008-02-27 20:31 |
| Nokia 6610 Microphone Hanging | saurabhmukadam | General Discussion | 1 | 2004-02-25 14:02 |
| Serious hanging prob in Jbuilder5 with 40Series SDK | farhanx | Mobile Java General | 0 | 2003-12-13 21:56 |
| Serious hanging prob in Jbuilder5 with 40S | farhanx | Mobile Java Tools & SDKs | 0 | 2003-12-13 21:53 |