Hi everybody, Assorgia and me, we have worked on the Flash client for Icecast2. We got successful results with: -Windows (Netscape, Mozilla, CompuServe, or Opera) -Macintosh and Linux(Netscape, Internet Explorer for Macintosh, Safari, AOL, Opera, or CompuServe) 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 -Pragma: no-cache -Connection: keep-alive -Content-Length: 54000000 We SUCCESSFULLY imported a live stream into Flash on Windows/IE using a PHP script that forwards these headers with the live stream to the Flash animation. We used this PHP script only for testing purposes. 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. 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? Thank you very much in advance, MAX <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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
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@xiph.org [mailto:owner-icecast-dev@xiph.org] On Behalf Of Karl Heyes Sent: Saturday, December 06, 2003 3:21 AM To: icecast-dev@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-cachepossibly> -Pragma: no-cacheIsn't this from the client.> -Connection: keep-alivehttp 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: 54000000well you don't know the length.> Now that we identified the exact problem, we would like to force Icecast2to> send these headers to the client because it would avoid passing throughthe> 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 somesource> 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@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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Saturday 06 December 2003 12:43, Macsym wrote:> Hi everybody, > > Assorgia and me, we have worked on the Flash client for Icecast2. We got > successful results with: > -Windows (Netscape, Mozilla, CompuServe, or Opera) -Macintosh and > Linux(Netscape, Internet Explorer for Macintosh, Safari, AOL, Opera, or > CompuServe) > > 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 > -Pragma: no-cache > -Connection: keep-aliveI doubt these three are relevant. It's simple enough to make icecast2 output the first 2 if really neccesary (unlikely), and the third would be possible with some work.> -Content-Length: 54000000This is probably the important one. It's not possible to send this when using a live stream - because in that case, obviously, the content-length is unknown. For fileserving, icecast2 should send a content-length header (it might, but I don't think it currently does), but that's not relevant for your use.> 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?See above: the main problem is that the important header CAN'T be sent for a live stream. Mike --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
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-cachepossibly> -Pragma: no-cacheIsn't this from the client.> -Connection: keep-alivehttp 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: 54000000well 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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.