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 2002/09/18 19:22:43 UTC
DO NOT REPLY [Bug 12783] New: -
Coyote Connector and HTTP 1.0 Keep-Alive
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=12783>.
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=12783
Coyote Connector and HTTP 1.0 Keep-Alive
Summary: Coyote Connector and HTTP 1.0 Keep-Alive
Product: Tomcat 4
Version: 4.0.4 Final
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Connector:Coyote HTTP/1.1
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: cizquierdo@timeindustrial.com
User Agent: IE (version 4.0+)
Type of Request: POST
Protocol: HTTP/1.0
The servlet is properly setting the content-length.
If these conditions are met, IE will block for the period of time specified in
the connectionTimeout parameter. This is due to the following lines in
Http11Processor.prepareResponse method:
(Aprox lines: 857 - 862)
int contentLength = response.getContentLength();
if (contentLength != -1) {
outputBuffer.addActiveFilter
(outputFilters[Constants.IDENTITY_FILTER]);
contentDelimitation = true;
}
And a little further down:
(Aprox lines: 880 - 884)
if ((entityBody) && (!contentDelimitation)) {
// Mark as close the connection after the request, and add the
// connection: close header
keepAlive = false;
}
By setting countDelimitation to true the keepAlive variable remains true and
the Coyote Connector will try to reuse the connection. Unfortunately IE doesn't
display the response but rather waits for the connection to be closed (Even
though IE sent Keep-Alives:True in the headers).
The current workaround involves not setting the content length for HTTP/1.0
connections.
A quick fix inside the coyote code would be to detect the User-Agent and if is
IE and the protocol is HTTP/1.0 close the connection.
Note that it works fine if instead of POST a GET is sent.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>