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

curl/get_url_file_name: use libcurl URL parser #9684

Closed
wants to merge 3 commits into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Oct 10, 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'

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
@bagder bagder force-pushed the bagder/extract-filename-url-parser branch from ba4a27f to 8f90e99 Compare Oct 10, 2022
@bagder bagder closed this in 671adfa Oct 11, 2022
@bagder bagder deleted the bagder/extract-filename-url-parser branch Oct 11, 2022
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
martinwhitaker pushed a commit to martinwhitaker/curl that referenced this pull request Nov 2, 2022
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 code that use curl and expect the old behaviour. This update
restores the original behaviour whilst still using the URL parser.

Fixes curl#9826
martinwhitaker pushed a commit to martinwhitaker/curl that referenced this pull request Nov 2, 2022
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 code that use curl and expect the old behaviour. This update
restores the original behaviour whilst still using the URL parser.

Fixes curl#9826
martinwhitaker pushed a commit to martinwhitaker/curl that referenced this pull request Nov 3, 2022
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 code 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants