input/curl: enable CURLOPT_NETRC

I wanted mpd to play a mp3 stream from a music website.  The stream is
only available to subscribers, which restriction is enforced through
normal http authentication.  However, the URL I get from the website
is not the final URL of the stream, but a generic URL which points to
the real one through a redirect (code 301).  Thus, I cannot predict
the final URL, and so I cannot use the username:password hack to force
the authentication, and mpd (libcurl on mpds behalf) fails to grab the
stream.

libcurl allows the option CURLOPT_NETRC to be set and then the
credentials can be stored in the good old .netrc file (in this case it
would be ~mpd/.netrc, of course).  But mpd doesn't set this option.  I
think it should.
This commit is contained in:
Ian Zimmerman
2011-01-29 08:43:30 +01:00
committed by Max Kellermann
parent 79e0db4ca0
commit 27aa34d4ae
2 changed files with 2 additions and 0 deletions

1
NEWS
View File

@@ -1,6 +1,7 @@
ver 0.17 (2010/??/??)
* input:
- cdio_paranoia: new input plugin to play audio CDs
- curl: enable CURLOPT_NETRC
* decoder:
- mpg123: implement seeking
* output: