tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 47736] Content-Length Missing (
Date Tue, 25 Aug 2009 21:14:50 GMT changed:

           What    |Removed                     |Added
            Summary|Content-Length Missing      |Content-Length Missing (

--- Comment #1 from 2009-08-25 14:14:47 PDT ---
The bugs is at 1538

Http11Processor: line 1531 – 1547

       long contentLength = response.getContentLengthLong();
        if (contentLength != -1) {
            contentDelimitation = true;
        } else {
Line 1538            if (entityBody && http11 && keepAlive) {
                contentDelimitation = true;
            } else {

When using HTTP 1.1 protocol, based on HTTP 1.1 spec 3.6. Server will use
Chunked Transfer Coding. Line 1538 works well when keepAlive is true. 
Either client does not want keepAlive or Server refuse keepAlive, line 1538
condition become false, Server will not use “Chunked Transfer Coding”. This is
wrong. Using Chunked Transfer Coding should NOT be impacted by whether
keepAlive is true or not because they are unrelated HTTP feature. 

Worse, it does not return content-length unless Application code calls
response.setContentLength() method. This is not right. For HTTP 1.1, either
Content-Length or Chunked Transfer Coding should present. If Application code
does not explicitly call response.setContentLenght(), Server should still
figure out content length itself if not using Chunked Transfer Coding.

Note: HTTP 1.0 does not support Chunked Transfer Coding and does not require
Content-Length neither. 

I think we should remove keepAlive in line 1638.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message