New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.61 regression: -O -J with http://foo/bar/ URL stopped working #2783

Closed
0-wiz-0 opened this Issue Jul 24, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@0-wiz-0

0-wiz-0 commented Jul 24, 2018

I did this

curl -OJ http://some/url/

I expected the following

A file based on the Content-Disposition: attachment; filename="..." to be created.
Instead I got

Warning: Remote filename has no length!
* Failed writing header

curl/libcurl version

Works with:
curl 7.60.0 (x86_64--netbsd) libcurl/7.60.0 OpenSSL/1.1.0h zlib/1.2.10 libidn2/2.0.4
Release-Date: 2018-05-16
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

Broken with:
curl 7.61.0 (x86_64--netbsd) libcurl/7.61.0 OpenSSL/1.1.0h zlib/1.2.10 libidn2/2.0.4
Release-Date: 2018-07-11
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

operating system

NetBSD, but I don't think it matters.

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder Jul 27, 2018

Member

We should also make sure that we write a test case for this so that we make sure the fix sticks!

Member

bagder commented Jul 27, 2018

We should also make sure that we write a test case for this so that we make sure the fix sticks!

bagder added a commit that referenced this issue Jul 30, 2018

curl: use Content-Disposition before the "URL end" for -OJ
Regression introduced in 7.61.0

Reported-by: Thomas Klausner
Fixes #2783

@bagder bagder closed this in e78f2cf Jul 31, 2018

xquery added a commit to xquery/curl that referenced this issue Aug 9, 2018

curl: use Content-Disposition before the "URL end" for -OJ
Regression introduced in 7.61.0

Reported-by: Thomas Klausner
Fixes #2783
Closes #2813

falconindy added a commit to falconindy/curl that referenced this issue Sep 10, 2018

curl: use Content-Disposition before the "URL end" for -OJ
Regression introduced in 7.61.0

Reported-by: Thomas Klausner
Fixes #2783
Closes #2813
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment