Skip to content
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

Wrong file name saved if download from bit.ly via curl #1

Open
jeffhung opened this issue Jun 5, 2015 · 1 comment
Open

Wrong file name saved if download from bit.ly via curl #1

jeffhung opened this issue Jun 5, 2015 · 1 comment

Comments

@jeffhung
Copy link
Owner

jeffhung commented Jun 5, 2015

The bit.ly shortcut URL will redirect to github. However, curl -O will determine the destination file name by originating URL, not the redirected URL. Therefore, the file will be saved as python-make because it is now allowed to use . in bit.ly.

The -J (--remote-header-name) option does not help, since github will not return with the Content-Disposition response header.

@jeffhung
Copy link
Owner Author

jeffhung commented Jun 5, 2015

The behavior of -O in curl is considered as a feature instead of a bug.
See: http://curl.haxx.se/mail/tracker-2010-07/0056.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant