| Reply | « Previous Thread | Next Thread » |
|
I use http connect to my CGI file,and this CGI file will keep connect with my mobile.
But,when i read one http chunked from http connect system throw Exception java.lang.ArrayIndexOutOfBoundsException at com.symbian.cldc.connection.InputStream.read(+90) at com.symbian.midp.io.protocol.http.HttpConnection$ChunkedInputStream.readChunkedBytes(+100) at com.symbian.midp.io.protocol.http.HttpConnection$ChunkedInputStream.read(+7) at com.symbian.midp.io.protocol.http.HttpConnection$ChunkedInputStream.read(+11) at java.io.DataInputStream.read(+7) at httptest.Displayable1.run(+237) my code is: while (true) { //System.out.println(ch); try{ if((ch = is.read()) == -1) break; }catch(Exception e) { e.printStackTrace(); break; } c = (char)ch; sbuf.append(c); } I receive raw data from PC socket is: HTTP/1.1 200 OK Date: Thu, 17 Apr 2003 03:34:47 GMT Server: Apache/1.3.27 (Unix) PHP/4.3.0RC1 X-Powered-By: PHP/4.3.0RC1 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html //chunked 1 chunked lenght is 0x8a <html> <head> <title>PHP test</title> <META content="text/html; charset=gb2312" http-equiv=Content-Type> </head> <body> 12345678<br> //chunked 2 chunked lenght is 0x0c c 12345678<br> //chunked 3 chunked lenght is 0x0c ... </body> </html> Will 7650 httpconnect only suppor one chunked? thanks for any help |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|