[icecast-dev] Missing headers in Icecast2

Macsym macsym69 at yahoo.fr
Fri Dec 5 22:12:21 PST 2003



Hi Karl,

I just checked in Icecast1 source, the line:

if (client_wants_content_length (con))
            sock_write (con->sock, "Cache-Control: no-cache\r\nPragma:
no-cache\r\nConnection: close\r\nContent-Length: 54000000\r\n");
          

is located in "client.c". Shouldn't I add this line in "client.c" of
Icecast2 instead of "format_mp3.c" as you advised me? If so, what should I
add exactly and where in the code (of Icecast2's client.c)?

Thanks in advance,

MAX

<p><p><p><p><p><p><p><p><p><p><p>-----Original Message-----
From: owner-icecast-dev at xiph.org [mailto:owner-icecast-dev at xiph.org] On
Behalf Of Macsym
Sent: Saturday, December 06, 2003 5:42 AM
To: icecast-dev at xiph.org
Subject: RE: [icecast-dev] Missing headers in Icecast2

Hi Karl,

Thanks for your help,
About the "Connection:" header, you are right, it's:
"Connection: close" and NOT "Connection: keep-alive". The protocol when the
SERVER sends the data is http 1.0. It's http 1.1 when the browser requests
the data.

I don't understand the "Content-Length: 54000000" header either. Also I
noticed the flash player on Windows/IE seems to stop after 52734KB are
loaded (54000000 bytes/1024 = 52734KB). I tried to change the
"Content-Length:" value but it didn't change anything...

I'll try changing the source code of Icecast2 as you advised, and compile
the modified code.

Thanks again,
MAX

<p>-----Original Message-----
From: owner-icecast-dev at xiph.org [mailto:owner-icecast-dev at xiph.org] On
Behalf Of Karl Heyes
Sent: Saturday, December 06, 2003 3:21 AM
To: icecast-dev at xiph.org
Subject: Re: [icecast-dev] Missing headers in Icecast2

On Sat, 2003-12-06 at 01:43, Macsym wrote:

> For Windows (Internet Explorer or AOL) some headers sent by Icecast2 are
> missing. These headers are sent by Icecast1 but NOT Icecast2 (it is the
> reason why it always works with Icecast1). These necessary headers are:

> -Cache-Control: no-cache
possibly

> -Pragma: no-cache
Isn't this from the client.

> -Connection: keep-alive
http 1.0 and http 1.1 differ on this. Sending "Connection: close" should
be ok though.  keep-alive isn't going to do anything with these types of
connections.

> -Content-Length: 54000000

well you don't know the length.

> Now that we identified the exact problem, we would like to force Icecast2
to
> send these headers to the client because it would avoid passing through
the
> PHP script (which is less reliable, slower the connection and uses more
> CPU). It is why I am contacting the dev-list today.

<p>> Can anybody advise us the best solution to force Icecast2 to send these
> headers to the browser? Should we build a patch or simply change some
source
> codes and compile the modified source?

add a couple of lines to verify it

in format_mp3.c at the end of function format_mp3_send_headers

Add something like

ock_write(client->con->sock, "Cache-Control: no-cache\r\n");

and whatever else.

karl.

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to
'icecast-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to
'icecast-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Icecast-dev mailing list