hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Santosh Gangadhar <sant...@wirkle.com>
Subject Re: Bug in using InputStreamRequestEntity and chunked encoding
Date Fri, 06 Mar 2009 11:03:57 GMT
Hi All,
After doing a few tests, the problem seems not be in http client. After the
service (doGet or doPost) method returns, at the back Tomcat does some
cleanup. As a part of this cleanup, it tries to read out all data coming in.
It does not *close* the stream after the service method and therefore the
http client keeps sending.

How can this be tackled? Is this a problem with Tomcat? Is this related to
Expect: 100 continue?

Please help.

Thanks,
Santosh.

On Thu, Mar 5, 2009 at 6:55 PM, Santosh Gangadhar <santosh@wirkle.com>wrote:

> Hi All,
> In the following code, pushServlet is a servlet that consumes data sent to
> it with an upper limit specified by the "mb" parameter.
> RandomDataInputStream is an InputStream generates some random data with an
> upper limit. If acceptMB < sendMB, then httpclient stops sending data,
> servlet stop receiving and sends response code 200 to http client. If
> acceptMB > sendMB, then although the servlet stops accepting data and its
> thread exits cleanly, the http client does not stop. It remains stuck at
> executeMethod(). Further, it seems to retry sending data to pushServlet
> again but no data is actually received there.
>
> Http client code: -
> http://rafb.net/p/GVNMxd61.html
>
> Push servelet code: -
> http://rafb.net/p/RrXrOx81.html
>
> RandomDataInputSteram code: -
> http://rafb.net/p/wNA9HN92.html
>
>
> There is no retry handler specified here. Specifying a retry handler that
> disallows a retry does not work either. Is this a bug? If the receving end
> has stopped accepting data and sent the repsonse code, http cleint should
> return from the executeMethod() method.
>
> Thanks,
> Santosh.
>



-- 
Santosh Gangadhar
Technical Lead, Wirkle
http://www.wirkle.com
+91 989.902.2981 (Mobile)

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Wirkle is a leading product engineering firm focused on developing software
products for the mobile including telecom grade client/server platforms, SMS
applications and Mobile Internet (WAP). The Company has designed, developed,
maintained, supported, tested and ported several mobile platforms for
hundreds of handsets of Nokia, Sony Ericsson, Samsung, LG, Motorola,
Blackberry, Pocket PC and iPhone.

Wirkle's expertise in the mobile space spans Social Networking, Instant
Messaging, Location Based Services, Multimedia Streaming, Banking,
Enterprise applications, Payments,  Barcode Scanning and beyond. Millions of
mobile users across the globe today are using products developed by Wirkle
through various carriers across multiple geographies including North America
– AT&T, Sprint/Nextel, Boost Mobile; Europe – Telenor; Asia – Airtel, Idea
and more. For more information please visit: www.wirkle.com

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message