mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vishal_Jain <pingvis...@gmail.com>
Subject Re: AsyncHttpClient with no content-length header
Date Wed, 05 Dec 2007 07:16:13 GMT

Should we modify the
org.apache.mina.filter.codec.http.HttpResponseDecodingState line 215 from
nextState = null
to
nextState = new ConsumeToCrLfDecodingState(){
                        @Override
                        protected DecodingState finishDecode(IoBuffer
readData,
                                ProtocolDecoderOutput out) throws Exception
{
                            response.setContent(readData);
                            out.write(response);
                            return null;
                        }
                    };

?

am just guessing, perhaps someone with good understanding of the code can
fix it better.

vishal



Vishal_Jain wrote:
> 
> Is there a JIRA id for this issue ? 
> or any workarounds ?
> 
> vishal
> 
> 
> berdim99 wrote:
>> 
>> Hi.
>> It seems that AsyncHttpClient fails to decode a web page in which the
>> web-server doesn't send a content-length header.
>> What happens is that the callback is called with a null content, after
>> which the decoder throws an exception because it thinks that the rest of
>> the incoming data are of a new HTTP response (but they are actually the
>> previous response content).
>> (Such web site is http://www.toptable.co.uk/).
>> 
>> Any help is appreciated.
>> Micha.
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/AsyncHttpClient-with-no-content-length-header-tf4723565s16868.html#a14166396
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Mime
View raw message