Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
eepm
Commits
b5c87d2d
Commit
b5c87d2d
authored
May 01, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: add support for UTF-8 filename in Content-disposition
parent
e4748e01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
tools_eget
bin/tools_eget
+7
-2
No files found.
bin/tools_eget
View file @
b5c87d2d
...
...
@@ -1026,12 +1026,17 @@ url_get_filename()
!
is_httpurl
"
$URL
"
&&
basename
"
$URL
"
&&
return
#
FIXME with wget
#
See https://www.cpcwood.com/blog/5-aws-s3-utf-8-content-disposition
local cd
=
"
$(
url_get_header
"
$URL
"
"Content-Disposition"
)
"
if
echo
"
$cd
"
|
grep
-q
"filename
\*
=UTF-8"
;
then
#Content-Disposition: attachment; filename="unityhub-amd64-3.3.0.deb"; filename*=UTF-8''"unityhub-amd64-3.3.0.deb"
echo
"
$cd
"
|
sed
-e
"s|.*filename
\*
=UTF-8''||"
-e
's|^"||'
-e
's|";$||'
-e
's|"$||'
return
fi
if
echo
"
$cd
"
|
grep
-q
"filename="
;
then
#Content-Disposition: attachment; filename=postman-linux-x64.tar.gz
#content-disposition: attachment; filename="code-1.77.1-1680651749.el7.x86_64.rpm"
echo
"
$cd
"
|
sed
-e
's|.*filename=||'
-e
's|^"||'
-e
's|";
$
||'
-e
's|"$||'
echo
"
$cd
"
|
sed
-e
's|.*filename=||'
-e
's|^"||'
-e
's|";
.*
||'
-e
's|"$||'
return
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment