The issue was that if the server sets a Content-Disposition header to suggest a file name during a download and the suggestion is wrapped in quotes, these quotes will not be striped away when saving the resulting file.
I simply added a line to trim both double and single quotes as well as spaces from either end of the file name. Not 100% sure if spaces could occur in this case but I thought better safe than sorry.
This fixes the bug from #40.
The issue was that if the server sets a
Content-Disposition
header to suggest a file name during a download and the suggestion is wrapped in quotes, these quotes will not be striped away when saving the resulting file.I simply added a line to trim both double and single quotes as well as spaces from either end of the file name. Not 100% sure if spaces could occur in this case but I thought better safe than sorry.