Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
864315f6
Commit
864315f6
authored
Aug 21, 2022
by
Klaus Frank
Committed by
Klaus Frank
Aug 24, 2022
Browse files
Use literal space
Replace [[:space:]] with " "
parent
713b7338
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
864315f6
...
...
@@ -2002,10 +2002,10 @@ _post() {
if
echo
$_WGET
|
grep
-q
" -d "
2> /dev/null
;
then
# Demultiplex wget debug output
cat
"
$HTTP_HEADER
"
>
&2
_sed_i
'/^[^
[:space:]][^[:space:]]/d; /^[[:space:]]
*$/d'
"
$HTTP_HEADER
"
_sed_i
'/^[^
][^ ]/d; /^
*$/d'
"
$HTTP_HEADER
"
fi
# remove leading whitespaces from header to match curl format
_sed_i
's/^
[[:space:]][[:space:]]
//g'
"
$HTTP_HEADER
"
_sed_i
's/^
//g'
"
$HTTP_HEADER
"
else
_ret
=
"
$?
"
_err
"Neither curl nor wget is found, can not do
$httpmethod
."
...
...
@@ -2062,17 +2062,17 @@ _get() {
if
echo
$_WGET
|
grep
-q
" -d "
2> /dev/null
;
then
# Demultiplex wget debug output
echo
"
$_wget_out
"
>
&2
echo
"
$_wget_out
"
|
sed
'/^[^
[:space:]][^[:space:]]/d; /^[[:space:]]*$/d; s/^[[:space:]][[:space:]]
//g'
-
echo
"
$_wget_out
"
|
sed
'/^[^
][^ ]/d; /^ *$/d; s/^
//g'
-
fi
else
$_WGET
--user-agent
=
"
$USER_AGENT
"
--header
"
$_H5
"
--header
"
$_H4
"
--header
"
$_H3
"
--header
"
$_H2
"
--header
"
$_H1
"
-S
-O
-
"
$url
"
2>
"
$HTTP_HEADER
"
if
echo
$_WGET
|
grep
-q
" -d "
2> /dev/null
;
then
# Demultiplex wget debug output
cat
"
$HTTP_HEADER
"
>
&2
_sed_i
'/^[^
[:space:]][^[:space:]]/d; /^[[:space:]]
*$/d'
"
$HTTP_HEADER
"
_sed_i
'/^[^
][^ ]/d; /^
*$/d'
"
$HTTP_HEADER
"
fi
# remove leading whitespaces from header to match curl format
_sed_i
's/^
[[:space:]][[:space:]]
//g'
"
$HTTP_HEADER
"
_sed_i
's/^
//g'
"
$HTTP_HEADER
"
fi
ret
=
$?
if
[
"
$ret
"
=
"8"
]
;
then
...
...
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