Closed hbakhtiyor closed 5 years ago
This is already supported and tested in TestFilenameResolution
: https://github.com/cavaliercoder/grab/blob/master/client_test.go#L25.
Do you have an example where this is not working?
for example, link
Hey I'm really confused about this issue. When I test the linked URL you gave, the filename is correctly resolved for me as hello.txt
. And your first example correctly resolves to example.zip
.
The existing tests (TestURLFilenames
and TestFilenameResolution
) already test for similar use cases - all without Content-Disposition
headers.
Can you please try to elaborate on this issue with a clear example of a failing test?
Closing due to inactivity. Please reopen and provide additional context if this is still important.
try to extract filename from url, if can't get from headers, for example http://example.com/example.zip?foo=bar&bar=too