*) Bugfix: calling close must not close the wrapped input stream, otherwise

keep-alive connections would terminate

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2853 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 18 years ago
parent d38ef0493d
commit 88cfdecd38

@ -66,10 +66,19 @@ public class httpContentLengthInputStream extends httpdByteCountInputStream {
return this.closed;
}
/**
* Closes this input stream.
* <b>Attention:</b> This does not close the wrapped input stream, because
* otherwise keep-alive connections would terminate
*/
public void close() throws IOException {
if (!this.closed) {
try {
// read to the end of the stream and throw read bytes away
httpChunkedInputStream.exhaustInputStream(this);
} finally {
this.closed = true;
super.close();
}
}
}

Loading…
Cancel
Save