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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to