[email protected] wrote:
Will do.
Not saying it will necessarily make a difference, just more of a 'what
is the proper usage' type of question.
Closing streams when done using them is basically a good java practice,
so the proper usage would be to close the stream _and_ to release the
connection. This will also make the migration to version 4.0 somewhat
easier.
Cheers
Oleg
Thanks again,
-k
-----Original Message-----
From: Oleg Kalnichevski [mailto:[email protected]]
Sent: Thursday, November 19, 2009 3:15 PM
To: HttpClient User Discussion
Subject: Re: Infinite loop in ChunkedInputStream.close
[email protected] wrote:
Oleg,
Thanks for the response.
I agree that it doesn't necessarily appear to be HttpClient code
itself.. because you are just calling to the jdk inputstream.read.
I did some research and saw that we are sending back
Transfer-Encoding:
chunked and am able to spot (in a network capture) on all the good
calls
the following:
30 0D 0A 0D 0A (which is 0 and the CRLF). We haven't reproduced the
error yet while doing a network capture so I'll respond with an update
as soon as we do.
In the mean time, am I correct in removing the ois.close() from my
code
and letting httpclient close it with the AutoCloseInputStream when I
call releaseConnection?
I do not think this should make any difference but you certainly can
give it a try.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase & Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]