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

Fix URL filename extraction in mods_downloader.sh #262

Merged

Conversation

msansen
Copy link
Contributor

@msansen msansen commented Aug 2, 2024

Fix cases when the url could contain query parameters (eg gitlab links with path)

The fix gets the filename from the server headers content-disposition: attachment; filename="real_filename.zip" and fallback to extracting using basename by removing the query parameter(s): $(basename "${url%%\?*}")

* Gets the filename from the server headers (content-disposition: filename)
* Fallback to extracting using basename by removing the query parameter(s)
@vinanrra
Copy link
Owner

vinanrra commented Aug 4, 2024

Hi thanks for the fix @msansen, really nice addition

@vinanrra vinanrra merged commit 69e5b0a into vinanrra:master Aug 4, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants