fix(download): wrong filename with dl_url_params#2064
Merged
Conversation
Contributor
Collaborator
Code Coverage (Ubuntu)DetailsDiff against developResults for commit: 2635d1c Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Collaborator
Code Coverage (Windows)DetailsDiff against developResults for commit: 2635d1c Minimum allowed coverage is ♻️ This comment has been updated with latest results |
sbrunato
requested changes
Mar 4, 2026
split on empty string returns an empty list, which not contains at least one element. with checking filename != "" before, this suggest open unsafe case. Co-authored-by: Sylvain Brunato <61419125+sbrunato@users.noreply.github.com>
sbrunato
approved these changes
Mar 4, 2026
sbrunato
pushed a commit
that referenced
this pull request
Mar 12, 2026
This file contains hidden or 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
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.
Fixes wrong filename when using
dl_url_paramsin download.Anomaly identified during PR feat(download): first class support for streaming download #2013 on test update
What's the problem ?
tests/units/test_eoproduct.py:
During update this test, using responses lib, additional check were added on filename control, with a particular focus on "dl_url_params"
eodag/plugins/download/http.py:741
Here, with extra Http get params, product._stream.url is like http://domain/filename.extension?param=1
os.path.basename() makes filename = "filename.extension?param=1" when expect 'filename.extension"
Proposal fix is to remove http get params and url anchors from url query string: