vinanrra / Docker-7DaysToDie

7 days to die server using LinuxGSM in Docker with backups, monitor, auto-installable mods and more
GNU General Public License v3.0
236 stars 47 forks source link

Fix URL filename extraction in mods_downloader.sh #262

Closed msansen closed 3 months ago

msansen commented 3 months ago

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%%\?*}")

vinanrra commented 3 months ago

Hi thanks for the fix @msansen, really nice addition