cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl bug/feature request

From: hypert <hypert_at_verizon.net>
Date: Tue, 06 Mar 2007 19:37:18 -0500

I'm new to list, but I didn't see any way on the curl website to
submit bugs, so I thought I'd give this a try.

I have a Mac OS X app called "m3u2mp3" that reads M3U files and
downloads the MP3s referenced inside, using curl of course. Someone
reported a problem with the M3U files from a certain site. If you go
to http://www.wefunkradio.com/show/2007-02-09 and download the M3U
strreaming music file there (http://www.wefunkradio.com/mirror/
WeFunk_Show_458_2007-02-09.m3u) and look at its contents, you'll see
a reference to a "streaming" music file at http://www.wefunkradio.com/
mirror/stream/2007-02-09/458.

Curl was failing to download this file, until I realized that the
webserver returns a 302 response (MOVED) and provides a new address
of http://85.214.17.244/wefunk/WeFunk_Show_458_2007-02-09.mp3. Well,
the handy curl manpage told me to use "--location", and problem
solved! Sort of. You see, my app now makes the call to "curl --
location --remote-name http://www.wefunkradio.com/mirror/stream/
2007-02-09/458", and curl saves the downloaded file as simply "458".

Could curl's "--remote-name" option be enhanced (or another option
added) to detect the "remote-name" from the redirected URL (not the
original URL), and save the contents into that filename? In this
example, the correct filename would be
"WeFunk_Show_458_2007-02-09.mp3", not "458".

Not only would this make my app a little more user-friendly, but I
think it would be a nice improvement for curl overall. Besides, as
an added incentive, one of your "competitors" (wget) does save using
the redirected filename. :-)

Thanks!
        hypert
Received on 2007-03-07