[icecast-dev] icecast2 ogg vorbis client request headers

Michael Smith msmith at xiph.org
Thu Apr 1 18:12:37 PST 2004



On Friday 02 April 2004 11:04, Dave St John wrote:
> > You must have some other, unrelated, problem, presumably elsewhere in
> > your code.
>
> this is what i have, and does work with mp3, but ogg does not want to work.
> im testing with winamp, you think that may be the issue?
>
>
>
> fwrite($fp,"GET /mymp3 HTTP/1.1\nUser-Agent:$HTTP_USER_AGENT\n\n");
> for ($i=0; $i<120; $i++) {
>   if (feof($sp)) break;
>   $str.=fread($sp,4096);
>   usleep(200000);
>   if (strpos($str,"\r\n\r\n")) break;
> }
>
> flush();
> echo substr($str,strpos($str,"\r\n\r\n")+4);
> flush();

I'm guessing here... so this could be completely wrong - but is this call to 
'echo' just above intended to send the HTTP headers? What about the rest of 
the data (i.e. the actual http body) that was read in your last fread() call? 
Dropping this will just cause some normal data packets to be dropped in the 
mp3 case, but with ogg it'll drop the (critically important) header packets.

So it's clearly wrong in both cases, but the consequences are worse for ogg.

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