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
curl/get_url_file_name: use libcurl URL parser #9684
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To avoid URL tricks, use the URL parser for this. This update changes curl's behavior slightly in that it will ignore the possible query part from the URL and only use the file name from the actual path from the URL. I consider it a bugfix. "curl -O localhost/name?giveme-giveme" will now save the output in the local file named 'name' Updated test 1210 to verify
ba4a27f
to
8f90e99
Compare
obonaventure
pushed a commit
to mptcp-apps/curl
that referenced
this pull request
Oct 12, 2022
To avoid URL tricks, use the URL parser for this. This update changes curl's behavior slightly in that it will ignore the possible query part from the URL and only use the file name from the actual path from the URL. I consider it a bugfix. "curl -O localhost/name?giveme-giveme" will now save the output in the local file named 'name' Updated test 1210 to verify Assisted-by: Jay Satiro Closes curl#9684
martinwhitaker
pushed a commit
to martinwhitaker/curl
that referenced
this pull request
Nov 2, 2022
…ote-name PR curl#9684 changed the behaviour of --remote-name to ignore the possible query part of the URL when generating the output file name. This breaks existing scripts that use curl and expect the old behaviour. This update restores the original behaviour whilst still using the URL parser. Fixes curl#9826
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To avoid URL tricks, use the URL parser for this.
This update changes curl's behavior slightly in that it will ignore the possible query part from the URL and only use the file name from the actual path from the URL. I consider it a bugfix.
"curl -O localhost/name?giveme-giveme" will now save the output in the local file named 'name'