How do I save a file using the response header filename with cURL

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2010-04-23T12:46:31Z Indexed on 2010/04/23 20:33 UTC
Read the original article Hit count: 207

Filed under:

This question relates to the command line version of cURL.

I'm trying to download a file from a cgi script.

http://someserver/perl/dl.pl?ID=2

Using a browser the filename comes up as 'remotefilename.gz' cURL wants to save the file as 'dl.pl?ID=2'

How do I get cURL to save to a file with the filename from the response header??

© Stack Overflow or respective owner

Related posts about curl