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
etersoft
eepm
Commits
f831a883
Commit
f831a883
authored
Apr 15, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: add --compressed (send Accept-Encoding and decode result)
parent
a3e27ce2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
tools_eget
bin/tools_eget
+11
-4
No files found.
bin/tools_eget
View file @
f831a883
...
@@ -289,6 +289,8 @@ WGETNOSSLCHECK=''
...
@@ -289,6 +289,8 @@ WGETNOSSLCHECK=''
CURLNOSSLCHECK
=
''
CURLNOSSLCHECK
=
''
WGETUSERAGENT
=
''
WGETUSERAGENT
=
''
CURLUSERAGENT
=
''
CURLUSERAGENT
=
''
WGETCOMPRESSED
=
''
CURLCOMPRESSED
=
''
WGETQ
=
''
#-q
WGETQ
=
''
#-q
CURLQ
=
''
#-s
CURLQ
=
''
#-s
# TODO: aria2c
# TODO: aria2c
...
@@ -330,6 +332,7 @@ Options:
...
@@ -330,6 +332,7 @@ Options:
--verbose - verbose mode
--verbose - verbose mode
-k|--no-check-certificate - skip SSL certificate chain support
-k|--no-check-certificate - skip SSL certificate chain support
-U|-A|--user-agent - send browser like UserAgent
-U|-A|--user-agent - send browser like UserAgent
--compressed - request a compressed response and automatically decompress the content
-4|--ipv4|--inet4-only - use only IPV4
-4|--ipv4|--inet4-only - use only IPV4
-6|--ipv6|--inet6-only - use only IPV6
-6|--ipv6|--inet6-only - use only IPV6
-O-|-O - - output downloaded file to stdout
-O-|-O - - output downloaded file to stdout
...
@@ -393,6 +396,10 @@ while [ -n "$1" ] ; do
...
@@ -393,6 +396,10 @@ while [ -n "$1" ] ; do
WGETUSERAGENT
=
"-U '
$user_agent
'"
WGETUSERAGENT
=
"-U '
$user_agent
'"
CURLUSERAGENT
=
"-A '
$user_agent
'"
CURLUSERAGENT
=
"-A '
$user_agent
'"
;;
;;
--compressed
)
CURLCOMPRESSED
=
'--compressed'
WGETCOMPRESSED
=
'--compression=auto'
;;
-4
|
--ipv4
|
--inet4-only
)
-4
|
--ipv4
|
--inet4-only
)
FORCEIPV
=
"-4"
FORCEIPV
=
"-4"
;;
;;
...
@@ -853,9 +860,9 @@ elif [ "$EGET_BACKEND" = "wget" ] ; then
...
@@ -853,9 +860,9 @@ elif [ "$EGET_BACKEND" = "wget" ] ; then
__wget
()
__wget
()
{
{
if
[
-n
"
$WGETUSERAGENT
"
]
;
then
if
[
-n
"
$WGETUSERAGENT
"
]
;
then
docmd
$WGET
$FORCEIPV
$WGETQ
$WGETNOSSLCHECK
"
$WGETUSERAGENT
"
"
$@
"
docmd
$WGET
$FORCEIPV
$WGETQ
$WGET
COMPRESSED
$WGET
NOSSLCHECK
"
$WGETUSERAGENT
"
"
$@
"
else
else
docmd
$WGET
$FORCEIPV
$WGETQ
$WGETNOSSLCHECK
"
$@
"
docmd
$WGET
$FORCEIPV
$WGETQ
$WGET
COMPRESSED
$WGET
NOSSLCHECK
"
$@
"
fi
fi
}
}
...
@@ -902,9 +909,9 @@ elif [ "$EGET_BACKEND" = "curl" ] ; then
...
@@ -902,9 +909,9 @@ elif [ "$EGET_BACKEND" = "curl" ] ; then
__curl
()
__curl
()
{
{
if
[
-n
"
$CURLUSERAGENT
"
]
;
then
if
[
-n
"
$CURLUSERAGENT
"
]
;
then
docmd
$CURL
$FORCEIPV
--fail
-L
$CURLQ
"
$CURLUSERAGENT
"
$CURLNOSSLCHECK
"
$@
"
docmd
$CURL
$FORCEIPV
--fail
-L
$CURLQ
$CURLCOMPRESSED
"
$CURLUSERAGENT
"
$CURLNOSSLCHECK
"
$@
"
else
else
docmd
$CURL
$FORCEIPV
--fail
-L
$CURLQ
$CURLNOSSLCHECK
"
$@
"
docmd
$CURL
$FORCEIPV
--fail
-L
$CURLQ
$CURL
COMPRESSED
$CURL
NOSSLCHECK
"
$@
"
fi
fi
}
}
# put remote content to stdout
# put remote content to stdout
...
...
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