What steps will reproduce the problem?
1. in package org.sandrop.webscarab.model,
the method: Message.flushContentStream(OutputStream os)
int got = _contentStream.read(buf);
int sum = got;
_logger.finest("Got " + got + " bytes");
while (got > 0) {
.....
I think here should be "got >= 0"
In java InputStream, it "Returns the number of bytes actually read or -1 if the
end of the stream has been reached."
Since it is a network process, delay unavailable.
2. Better have a version of this method with Content-Length used.
Suppose that, on internet, these are some web servers or gateways, when have
all data transfered, but still waiting for client to close the connection.(for
reason of TCP closing status transfering, heavy loaded servers are more hoping
for client to close the connection first, I think it is also why the HTTP
"Content-Length" used)
So if Content-Length is got from server, flushContentStream() can use it to
compare with variable "sum" in the function, to find the first time to return.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by
harr...@gmail.comon 21 May 2014 at 8:42