Error while receiving Chunked responses

Trustin Lee trustin at gleamynode.net
Tue Jan 13 11:31:10 EST 2009


I guess it's a bug.  Could you post the whole HTTP request and
response so that I can analyze the root cause of the problem?  (Please
do the same for the recent one related with XMLHTTPRequest.)  To
intercept the HTTP request and response, you could use an existing
HTTP monitoring tools like:

    * http://www.fiddlertool.com/fiddler/

If you are not using Windows, please google 'HTTP debugging proxy.' to
get one.  Wireshark is also great for this, but it's not specific to
HTTP.

— Trustin Lee, http://gleamynode.net/

On Tue, Jan 13, 2009 at 11:15 PM, jaimemm <jaimemm at gmail.com> wrote:
>
> I've forgot to say that the 2000 is the first line of the response's body
> (bytes of the chunk)
> With other http client the response is perfectly received (so it's not a
> problem).
>
>
> jaimemm wrote:
>>
>> Hi,
>>
>> I'm getting the following error while receiving chunked responses from a
>> JBOSS server
>>
>> ----------
>> 13-Jan-2009 13:48:37 org.jboss.netty.channel.SimpleChannelHandler
>> WARNING: EXCEPTION, please implement
>> test.netty.HttpResponseHandler.exceptionCaught() for proper handling.
>> java.lang.IllegalArgumentException: Invalid initial line: 2000
>>       at
>> org.jboss.netty.handler.codec.http.HttpMessageDecoder.splitInitial(HttpMessageDecoder.java:231)
>>       at
>> org.jboss.netty.handler.codec.http.HttpResponseDecoder.readInitial(HttpResponseDecoder.java:39)
>>       at
>> org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:80)
>>       at
>> org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:42)
>>       at
>> org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:372)
>>       at
>> org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:345)
>>       at
>> org.jboss.netty.handler.codec.replay.ReplayingDecoder.handleUpstream(ReplayingDecoder.java:308)
>>       at
>> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:293)
>>       at
>> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:280)
>>       at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:299)
>>       at
>> org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:244)
>>       at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:161)
>>       at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>       at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>       at java.lang.Thread.run(Thread.java:619)
>> -------------
>>
>> The code of the handler is as follows:
>>
>> @ChannelPipelineCoverage("all")
>> public class HttpResponseHandler extends SimpleChannelHandler {
>>
>>       private BlockingQueue<Object[]> outboundQueue;
>>       private Object[] arr;
>>
>>       public HttpResponseHandler(Object[] a,BlockingQueue<Object[]> q)
>>       {
>>               arr=a;
>>               outboundQueue=q;
>>
>>       }
>>
>>       @Override
>>       public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
>> throws Exception {
>>               HttpResponse response = (HttpResponse) e.getMessage();
>>
>>
>>               System.out.println("HTTP Client - Response Received
>> through:"+response.getContent().toString(Charset.defaultCharset().name()));
>>               }
>> }
>>
>> Could anyone help?
>>
>> Thanks
>>
>
> --
> View this message in context: http://n2.nabble.com/Error-while-receiving-Chunked-responses-tp2151225p2151317.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
>




More information about the netty-users mailing list