Menu

#19 detect -O filename from last redirect

open
nobody
2014-01-10
2005-11-23
No

If using -O option to write output file curl tries to
detect filename immediately. Quite often the links from
download sites are intermediary and lead to some kind
of redirect script such as
http://go.microsoft.com/fwlink/?LinkId=51433. When you
try to download this link specifying -O option curl
fails with the following error.

Warning: Failed to create the file ?LinkId=51433
* Failed writing body
100 212 100 212 0 0 106 0 0:00:02
0:00:01 0:00:01 268* Closing connection #0

Can curl detect filename from last redirect?

Thanks.

Discussion

  • anatoly techtonik

    • labels: --> command line client
    • milestone: --> download
     
  • Daniel Stenberg

    Daniel Stenberg - 2005-11-23

    Logged In: YES
    user_id=1110

    It certainly _could_ do it, sure. In the similar spirit, it
    could of course also be made to recognize the
    Content-Disposition: header that might contain a file name
    of the remote file as well...

     
  • Jim T.

    Jim T. - 2007-03-07

    Logged In: YES
    user_id=972831
    Originator: NO

    I'd like to second this motion. Could this be fixed?

     

Log in to post a comment.

MongoDB Logo MongoDB