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 2010/12/18 05:10:41 UTC

DO NOT REPLY [Bug 50494] New: Need to add ability to disable chunked encoding or support HTTP 1.0 response.

https://issues.apache.org/bugzilla/show_bug.cgi?id=50494

           Summary: Need to add ability to disable chunked encoding or
                    support HTTP 1.0 response.
           Product: Tomcat 7
           Version: 7.0.5
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Connectors
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: goberman@msn.com


I use NIO HTTP Tomcat connector org.apache.coyote.Http11NioProtocol to
implement Comet streaming to browsers and mobile devices. 
The application opens 'primary' persistent Comet connection to receive data
from the server. Server sends data to the client periodically.

Currently, the response always uses HTTP 1.1 type response with chunked
encoding.

There could be a legitimate reason to disable chunked encoding - use
"Connection: close" without "Content-Length" headers.

For example, if I use tomcat to implement EventType streaming with Chrome, it
does not like chunked encoding and fails to receive any data. Also, chunked
encoding increases network bandwidth.

One way to disable chunked encoding (and actually the one I would prefer) is to
force HTTP 1.0 response.

So my questions are: 
1) is it possible to force HTTP 1.0 response
2) is it possible to use HTTP 1.1 response, but disable chunked encoding.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 50494] Need to add ability to disable chunked encoding or support HTTP 1.0 response.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50494

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Mark Thomas <ma...@apache.org> 2011-01-04 09:55:33 EST ---
Bugzilla is not a support forum. These questions below on the users mailing
list.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 50494] Need to add ability to disable chunked encoding or support HTTP 1.0 response.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50494

--- Comment #3 from Mark Thomas <ma...@apache.org> 2011-01-04 10:09:15 EST ---
The questions you asked "Is it possible to ...?" are support questions that
belong on the users mailing list. Enhancement requests are usually phrased
"Please add an option to ..."

Enhancement requests can be made by selecting 'enhancement' for the issues
severity.

Given your questions, I'd recommend the users list is the place to start to get
the "Is it possible to ..." answers and then open an enhancement request if
there is a new feature you'd like to see.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 50494] Need to add ability to disable chunked encoding or support HTTP 1.0 response.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50494

goberman@msn.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |
           Severity|critical                    |enhancement

--- Comment #4 from goberman@msn.com 2011-01-04 10:16:35 EST ---
Given how fast you reject enhancement requests, I feel it will be waste of
time, but, just to please you I am making the changes:

I use NIO HTTP Tomcat connector org.apache.coyote.Http11NioProtocol to
implement Comet streaming to browsers and mobile devices. 
The application opens 'primary' persistent Comet connection to receive data
from the server. Server sends data to the client periodically.

Currently, the response always uses HTTP 1.1 type response with chunked
encoding.

There could be a legitimate reason to disable chunked encoding - use
"Connection: close" without "Content-Length" headers.

For example, if I use tomcat to implement EventType streaming with Chrome, it
does not like chunked encoding and fails to receive any data. Also, chunked
encoding increases network bandwidth.

One way to disable chunked encoding (and actually the one I would prefer) is to
force HTTP 1.0 response.

PLEASE ADD AN OPTION TO:
1) force HTTP 1.0 response.
2) use HTTP 1.1 response, but disable chunked encoding.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 50494] Need to add ability to disable chunked encoding or support HTTP 1.0 response.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50494

goberman@msn.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |goberman@msn.com

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 50494] Need to add ability to disable chunked encoding or support HTTP 1.0 response.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50494

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID

--- Comment #5 from Mark Thomas <ma...@apache.org> 2011-01-04 10:52:52 EST ---
Tomcat aims to implement the various specifications (HTTP, Servlet, etc.) as
closely as possible and deviates from those specifications only when there is a
very good reason to do so. Working around bugs in third party applications is
typically not viewed as good reason to diverge from the specifications.

Quoting from section 4.4 of the HTTP 1.1 spec:
<quote>
All HTTP/1.1 applications that receive entities MUST accept the
"chunked" transfer-coding (section 3.6), thus allowing this mechanism
to be used for messages when the message length cannot be determined
in advance.
</quote>

With the above in mind, this looks like a bug in the user agent.

I can think of several ways to force a non-chunked response with the current
Tomcat versions. As I said previously, the users mailing list is the place to
discuss this. If a discussion on the users list identifies a use case that
isn't currently supported, that would be the point to re-open this issue.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 50494] Need to add ability to disable chunked encoding or support HTTP 1.0 response.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50494

--- Comment #2 from goberman@msn.com 2011-01-04 10:02:30 EST ---
This is not a support question. It is a legitimate requests for enhancement. Is
there a place I can request enhancements for Tomcat?
Or maybe you do not accept requests for enhancements?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org