remote-header-name.d 1.1 KB

12345678910111213141516171819202122232425262728
  1. Long: remote-header-name
  2. Short: J
  3. Protocols: HTTP
  4. Help: Use the header-provided filename
  5. Category: output
  6. Example: -OJ https://example.com/file
  7. Added: 7.20.0
  8. See-also: remote-name
  9. ---
  10. This option tells the --remote-name option to use the server-specified
  11. Content-Disposition filename instead of extracting a filename from the URL. If
  12. the server-provided file name contains a path, that will be stripped off
  13. before the file name is used.
  14. The file is saved in the current directory, or in the directory specified with
  15. --output-dir.
  16. If the server specifies a file name and a file with that name already exists
  17. in the destination directory, it will not be overwritten and an error will
  18. occur. If the server does not specify a file name then this option has no
  19. effect.
  20. There's no attempt to decode %-sequences (yet) in the provided file name, so
  21. this option may provide you with rather unexpected file names.
  22. **WARNING**: Exercise judicious use of this option, especially on Windows. A
  23. rogue server could send you the name of a DLL or other file that could be
  24. loaded automatically by Windows or some third party software.