[PATCH] moc with libcurl4 (7.16.x)

For those who are trying to get streaming radio to work with moc + libcurl3/4 I found a fix.
new version of libcurl by default use HTTP/1.1 you can force it use HTTP/1.0 with following patch

Happy patching!

BR,
Samid Tennakoon

Index: io_curl.c
===================================================================

--- io_curl.c	(old)
+++ io_curl.c	(new)
@@ -234,6 +234,7 @@
 	s->curl.http_headers = curl_slist_append (NULL, "Icy-MetaData: 1");
 
 	curl_easy_setopt (s->curl.handle, CURLOPT_NOPROGRESS, 1);
+	curl_easy_setopt (s->curl.handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
 	curl_easy_setopt (s->curl.handle, CURLOPT_WRITEFUNCTION,
 			write_callback);
 	curl_easy_setopt (s->curl.handle, CURLOPT_WRITEDATA, s);

Great :)
Can anybody confirm this? For me without this change it sometimes works sometimes not...

--
Damian Pietras - MOC developer

Hi,

yes, the fix works for me with 3 different mp3-streams that didn't work before. ogg-streams are ok.

ciao, storm

hi,
will this patch make it to the official code?
will it be in the patch section on your site?
br,
/../Samid

Yes, I'll give it a bit of testing and include it into future releases.

--
Damian Pietras - MOC developer

And here it is: patches.
--
Damian Pietras - MOC developer

cheers :)

Works great!

Thanks