Skip to content

--remote-header-name doesn't work when a scheme is missing from a URL #760

@nodakai

Description

@nodakai

I did this

curl -v -OJL win.rustup.rs

I expected the following

I expected to successfully download rustup-setup.exe according to

Content-Disposition: attachement; filename=rustup-setup.exe

but I got the following error:

{ [3724 bytes data]
Warning: Remote filename has no length!
* Failed writing body (0 != 3724)
  0 9026k    0  3724    0     0   7548      0  0:20:24 --:--:--  0:20:24  7538
* Closing connection 0
curl: (23) Failed writing body (0 != 3724)

curl/libcurl version

$ curl -V
curl 7.48.0-DEV (x86_64-unknown-linux-gnu) libcurl/7.48.0-DEV OpenSSL/1.0.2c zlib/1.2.3 libidn/1.18
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets

operating system

$ more /etc/redhat-release
CentOS release 6.6 (Final)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions