tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukas Österreicher <lukas.oesterreic...@inode.at>
Subject Re: weired chunked encoding (how to disable properly)
Date Wed, 14 Jan 2004 13:41:54 GMT
Hi.

This is strange, then:

Winamp requests in HTTP 1.0 but Tomcat (now installed 5.0.16) respons in 
HTTP 1.1 and has no content length AND no chunked encoding.

See the HTTP headers by yourself:

GET /yarf/n_The_MUCK.mp3;jsessionid=D4E5F5AFA47090670FBEF73FCF2AAF86?trackid=1&file.mp3
HTTP/1.0..Host: yarf.sytes.net..User-Agent: WinampMPEG/5.0..Accept: */*..Icy-
MetaData:1..Connection: close....

HTTP/1.1 200 OK..Content-Location: In_The_MUCK_28k.mp3..Content-Type: audio/x-mpeg..Date:
Wed, 14 Jan 2004 13:15:12 GMT..Server: Apache-Coyote/1.1..Connection: close....

How can that be? This goes against the standards as you mentioned (although it does what I
want and works).

Additionally, when requesting in http 1.1 (which Winamp does when requesting ogg), I get this:

GET /yarf/In_The_MUCK.ogg;jsessionid=D4E5F5AFA47090670FBEF73FCF2AAF86?trackid=1&file.ogg
HTTP/1.1..Host:yarf.sytes.net..User-Agent:Winamp..Accept:*/*....

HTTP/1.1 200 OK..Content-Location: In_The_MUCK_isdn.ogg..Content-Type: application/ogg..Transfer-Encoding:
chunked..Date: Wed, 14 Jan 2004 13:17:22 GMT..Server: Apache-
Coyote/1.1....400..

Notice the 400 at the end which tells that a 400 byte chunk follows.
For some odd reason it sometimes sends in 400 byte chunks, but sometimes in 2000 byte chunks.
Winamp at least recognizes the stream as audio and jerkily plays with 2000 chunks but does
nothing with 400 byte chunks.

I added a parameter restrictedUserAgents="Winamp" to the connector (also tried Winamp.*) but
no change in server behaviour. What am I doing wrong?
How to respond in HTTP 1.0 without chunked encoding (and ofcourse no content length)
in the second case?

Thanx in Advance,
Lukas Österreicher



Am 13.01.2004 21:13:51, schrieb Antonio Fiol Bonnín <fiol.bonnin@terra.es>:

>
>>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
>





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


Mime
View raw message