Alternately, you can use HTTP 1.1, but buffer the entire response in your
Servlet (create a copy of whatever you're sending in memory), then at the
end of your servlet manually set the Content-Length header, then output
the response.
This is fine for small responses, but problematic for large responses
since data is no longer streamed.
justin
At 12:13 PM 1/13/2004, you wrote:
>>My questions:
>>- how to disable chunked encoding even when there is no content length?
>>
>>- why does tomcat not use chunked encoding when sending mp3 files (and
>>no content length is set)
>> and why does'nt it for ogg?
>>
>
>See RFC 2616. Using either the Content-Length header OR chunked encoding
>is a MUST in HTTP 1.1.
>
>Something different is using HTTP 1.0.
>
>The only (HTTP) ways of sending an unknown length file are:
>a) Using HTTP 1.0, and closing the connection at the end (but the client
>cannot know for sure that the file end has arrived, and I am not even
>sure it is standards compliant).
>b) Using HTTP 1.1, and using chunked encoding.
>
>Yours,
>
>Antonio Fiol
>
>
______________________________________________
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
______________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)