On 05/12/2011 01:13 AM, sebb wrote:
On 11 May 2011 20:33, Oleg Kalnichevski<[email protected]>  wrote:
On Wed, 2011-05-11 at 21:48 +0530, Asankha C. Perera wrote:
On a slightly different - but related note, if the remote party was to
close the connection abruptly while writing its response entity, and if
length delimited encoding was used, it seems like we accept the partial
response as a successfully received full response, instead of a socket
close. I am trying this with a ESB level unit test and a raw TCP socket
server ..

I believe this is caused by the following completion check in read() and
transfer():
          if (bytesRead == -1) {
              this.completed = true;
              return -1;
          }

Do you think we should also check if the expected length was received?
I think we should. What is worse, the current behavior of the
content-length delimited decoder is inconsistent with that of the chunk
decoder that correctly throws an I/O exception if a truncated chunk is
encountered.

The same problem exists with the blocking the content-length delimited
input stream.

Shall we call off the release because of this issue?
There's no critical fix in the release, so there's no harm in delaying it.

It's probably less work in total to redo the release now.

But your call if you prefer to fix the code in a subsequent release.
Hi Oleg

Just saw that you had called off the vote.. I will check the fix once the changes are committed

I assume that sometimes the content length does go off from the actual size in reality by some servers.. Do you think length checking could cause too many false alarms in such cases?

thanks
asankha

--
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to