fix issue, Wget 1.13.4 doesn't support "--method"
This commit is contained in:
parent
484d9d2ad8
commit
8fb9a709b0
12
acme.sh
12
acme.sh
@ -588,9 +588,17 @@ _post() {
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ "$needbase64" ] ; then
|
if [ "$needbase64" ] ; then
|
||||||
response="$($WGET -S -O - --user-agent="$USER_AGENT" --method $httpmethod --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1" --body-data="$body" "$url" 2>"$HTTP_HEADER" | _base64)"
|
if [ "$httpmethod"="POST" ] ; then
|
||||||
|
response="$($WGET -S -O - --user-agent="$USER_AGENT" --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1" --post-data="$body" "$url" 2>"$HTTP_HEADER" | _base64)"
|
||||||
else
|
else
|
||||||
response="$($WGET -S -O - --user-agent="$USER_AGENT" --method $httpmethod --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1" --body-data="$body" "$url" 2>"$HTTP_HEADER")"
|
response="$($WGET -S -O - --user-agent="$USER_AGENT" --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1" --method $httpmethod --body-data="$body" "$url" 2>"$HTTP_HEADER" | _base64)"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "$httpmethod"="POST" ] ; then
|
||||||
|
response="$($WGET -S -O - --user-agent="$USER_AGENT" --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1" --post-data="$body" "$url" 2>"$HTTP_HEADER")"
|
||||||
|
else
|
||||||
|
response="$($WGET -S -O - --user-agent="$USER_AGENT" --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1" --method $httpmethod --body-data="$body" "$url" 2>"$HTTP_HEADER")"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
_sed_i "s/^ *//g" "$HTTP_HEADER"
|
_sed_i "s/^ *//g" "$HTTP_HEADER"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user