You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2001/11/26 10:31:18 UTC
DO NOT REPLY [Bug 5078] New: -
org.apache.catalina.connector.http.HttpRequestStream.close() method is too strict - it does not allow to close the stream twice
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5078>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5078
org.apache.catalina.connector.http.HttpRequestStream.close() method is too strict - it does not allow to close the stream twice
Summary: org.apache.catalina.connector.http.HttpRequestStream.clo
se() method is too strict - it does not allow to close
the stream twice
Product: Tomcat 4
Version: 4.0.1 Final
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: HTTP/1.1 Connector
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: alex1979_18@yahoo.com
org.apache.catalina.connector.http.HttpRequestStream.close() method is too
strict - it does not allow to close the stream twice. The problem is that many
third party code close the stream several times (for example, Sun's JAXB)... I
can eliminate it in my code, but not in others'.
public void close()
throws IOException {
////////////// this is too strict
// can we simply return?
if (closed)
throw new IOException(sm.getString("requestStream.close.closed"));
if (chunk) {
while (!endChunk) {
int b = read();
if (b < 0)
break;
}
} else {
if (http11 && (length > 0)) {
while (count < length) {
int b = read();
if (b < 0)
break;
}
}
}
closed = true;
}
Thank you.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>