Hi,

I suggest you some careful reading of RFC2616, because I am not sure of what is the right answer here.

My interpretation, but again I am not sure, is:

WA is saying: "Hi! I speak HTTP/1.0, could you please send me that resource?"
TC is saying: "Nice to meet you! I can *even* speak HTTP/1.1, and here is what you requested -(and in the way you requested it, which is HTTP/1.0)-.

Read the "compatibility" section of RFC2616. I think you may find the answer there.

Antonio Fiol

Lukas Österreicher wrote:

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



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






Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to