Closed chainsawriot closed 5 months ago
This bunch of code is not tested
The logic in this bunch of code looks incorrect to me. But I don't have a URL that can test this code.
I am asking myself: is it popular to have a URL of a file without a file extension, even with the final redirected url, but with the Content Disposition
? If it is really the case, is it still rio
's responsibility to stiff the curl HEADER for it's file format? It appears to go back to #238.
A colleague pointed me to this MDN article.
The Content-Disposition header is defined in the larger context of MIME messages for email, but only a subset of the possible parameters apply to HTTP forms and POST requests. Only the value form-data, as well as the optional directive name and filename, can be used in the HTTP context.
Probably, it is only for a URL that is like a HTTP form request.
The two large if blocks and the repeated handling of google urls scream refactoring.