get_http_file_name if not content_type
This commit is contained in:
parent
73f3a21904
commit
2e6c0f823d
@ -46,7 +46,10 @@ function get_http_file_name(url, headers)
|
|||||||
content_type = content_type or headers["Content-type"]
|
content_type = content_type or headers["Content-type"]
|
||||||
content_type = content_type or h["Content-Type"]
|
content_type = content_type or h["Content-Type"]
|
||||||
|
|
||||||
local extension = mimetype.get_mime_extension(content_type)
|
local extension = nil
|
||||||
|
if content_type then
|
||||||
|
extension = mimetype.get_mime_extension(content_type)
|
||||||
|
end
|
||||||
if extension then
|
if extension then
|
||||||
file_name = file_name.."."..extension
|
file_name = file_name.."."..extension
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user