mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-04 21:18:01 +08:00
修复有时文件下载获取文件名出错的问题
This commit is contained in:
parent
38086b11af
commit
ebe3177b0c
@ -367,7 +367,7 @@ class SessionPage(object):
|
||||
|
||||
# 使用header里的文件名
|
||||
if content_disposition:
|
||||
file_name = r.headers[content_disposition[0]].encode('ISO-8859-1').decode('utf-8')
|
||||
file_name = content_disposition.encode('ISO-8859-1').decode('utf-8')
|
||||
file_name = re.search(r'filename *= *"?([^";]+)', file_name)
|
||||
|
||||
if file_name:
|
||||
|
Loading…
Reference in New Issue
Block a user