cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_HEADERFUNCTION with non-HTTP response ?

From: ruffnex <ruffnex_at_mac.com>
Date: Sun, 10 Nov 2002 23:14:28 +0800

Apologies, this must look as though I'm talking to myself! Summary of what
I have discovered / solutions:

1. A patch below will allow Shoutcast/Icecast streams to be treated as a
normal HTTP 200 response. It is applied to v7.10.1 "lib/transfer.c".
Perhaps you could include this in future with a #ifdef SHOUTCAST.

2. Callbacks are invoked correctly, but if printing debug messages, stdout
must be flushed else they never appear (hence I thought the callbacks weren'
t being invoked). In this case, flushing seems necessary for streaming
data, unlike chunky http data.

Thanks for reading,
Cheers
Simon

> Patch:
> 466,478d465
> < /* Simon Liu - 9 Nov 02
> < Hack for ShoutCast response of 'ICY 200 OK'
> < Don't bother scanning for return code, as we don't know
> what other return
> < values IceCast/ShoutCast will use (undocumented, subject
> to change)
> < */
> < if (!nc) {
> < if ( strstr( k->p, "ICY 200 OK" )) {
> < nc = 1;
> < k->httpcode = 200;
> < k->httpversion = 10;
> < }
> < }
> <

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-11-10