hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Detecting an aborted GET request w/ chunked encoding
Date Wed, 13 Jun 2012 20:12:42 GMT
On Wed, 2012-06-13 at 20:00 +0100, John Sheehy wrote:
> >
> >
> > John
> >
> > I looked at the source code and found no way to override the default
> > behavior other than copying the entire ChunkedInputStream class and
> > overriding the entity deserializer used by the default HTTP connection
> > implementation.
> >
> > Oleg
> >
> >
> Thanks for checking Oleg.
> 
> I'm a little unsure of what you mean here, I have ChunkedInputStream.java
> from
> httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java (v
> 4.2) -
> is there some field I need to override in this class, or modify it
> otherwise?
> 
> Thanks,
> John.

John

If you do not have a problem with changing the source and recompiling
HttpClient all you need is to make #getChunkSize() method throw an
exception if a read operation returns -1 (end of stream).

Hope this helps

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message