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
5244097e
Unverified
Commit
5244097e
authored
Sep 24, 2019
by
neil
Committed by
GitHub
Sep 24, 2019
Browse files
Merge pull request #2504 from Neilpang/dev
fix
https://github.com/Neilpang/acme.sh/issues/2503
parents
2e855f89
1ba4ab2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
5244097e
...
@@ -1702,16 +1702,32 @@ _post() {
...
@@ -1702,16 +1702,32 @@ _post() {
fi
fi
_debug
"_CURL"
"
$_CURL
"
_debug
"_CURL"
"
$_CURL
"
if
[
"
$needbase64
"
]
;
then
if
[
"
$needbase64
"
]
;
then
if
[
"
$_postContentType
"
]
;
then
if
[
"
$body
"
]
;
then
response
=
"
$(
$_CURL
--user-agent
"
$USER_AGENT
"
-X
$httpmethod
-H
"Content-Type:
$_postContentType
"
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
-H
"
$_H5
"
--data
"
$body
"
"
$_post_url
"
| _base64
)
"
if
[
"
$_postContentType
"
]
;
then
response
=
"
$(
$_CURL
--user-agent
"
$USER_AGENT
"
-X
$httpmethod
-H
"Content-Type:
$_postContentType
"
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
-H
"
$_H5
"
--data
"
$body
"
"
$_post_url
"
| _base64
)
"
else
response
=
"
$(
$_CURL
--user-agent
"
$USER_AGENT
"
-X
$httpmethod
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
-H
"
$_H5
"
--data
"
$body
"
"
$_post_url
"
| _base64
)
"
fi
else
else
response
=
"
$(
$_CURL
--user-agent
"
$USER_AGENT
"
-X
$httpmethod
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
-H
"
$_H5
"
--data
"
$body
"
"
$_post_url
"
| _base64
)
"
if
[
"
$_postContentType
"
]
;
then
response
=
"
$(
$_CURL
--user-agent
"
$USER_AGENT
"
-X
$httpmethod
-H
"Content-Type:
$_postContentType
"
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
-H
"
$_H5
"
"
$_post_url
"
| _base64
)
"
else
response
=
"
$(
$_CURL
--user-agent
"
$USER_AGENT
"
-X
$httpmethod
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
-H
"
$_H5
"
"
$_post_url
"
| _base64
)
"
fi
fi
fi
else
else
if
[
"
$_postContentType
"
]
;
then
if
[
"
$body
"
]
;
then
response
=
"
$(
$_CURL
--user-agent
"
$USER_AGENT
"
-X
$httpmethod
-H
"Content-Type:
$_postContentType
"
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
-H
"
$_H5
"
--data
"
$body
"
"
$_post_url
"
)
"
if
[
"
$_postContentType
"
]
;
then
response
=
"
$(
$_CURL
--user-agent
"
$USER_AGENT
"
-X
$httpmethod
-H
"Content-Type:
$_postContentType
"
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
-H
"
$_H5
"
--data
"
$body
"
"
$_post_url
"
)
"
else
response
=
"
$(
$_CURL
--user-agent
"
$USER_AGENT
"
-X
$httpmethod
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
-H
"
$_H5
"
--data
"
$body
"
"
$_post_url
"
)
"
fi
else
else
response
=
"
$(
$_CURL
--user-agent
"
$USER_AGENT
"
-X
$httpmethod
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
-H
"
$_H5
"
--data
"
$body
"
"
$_post_url
"
)
"
if
[
"
$_postContentType
"
]
;
then
response
=
"
$(
$_CURL
--user-agent
"
$USER_AGENT
"
-X
$httpmethod
-H
"Content-Type:
$_postContentType
"
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
-H
"
$_H5
"
"
$_post_url
"
)
"
else
response
=
"
$(
$_CURL
--user-agent
"
$USER_AGENT
"
-X
$httpmethod
-H
"
$_H1
"
-H
"
$_H2
"
-H
"
$_H3
"
-H
"
$_H4
"
-H
"
$_H5
"
"
$_post_url
"
)
"
fi
fi
fi
fi
fi
_ret
=
"
$?
"
_ret
=
"
$?
"
...
@@ -1890,7 +1906,7 @@ _send_signed_request() {
...
@@ -1890,7 +1906,7 @@ _send_signed_request() {
if
[
"
$ACME_NEW_NONCE
"
]
;
then
if
[
"
$ACME_NEW_NONCE
"
]
;
then
_debug2
"Get nonce with HEAD. ACME_NEW_NONCE"
"
$ACME_NEW_NONCE
"
_debug2
"Get nonce with HEAD. ACME_NEW_NONCE"
"
$ACME_NEW_NONCE
"
nonceurl
=
"
$ACME_NEW_NONCE
"
nonceurl
=
"
$ACME_NEW_NONCE
"
if
_post
""
"
$nonceurl
"
""
"HEAD"
"
$__request_conent_type
"
;
then
if
_post
""
"
$nonceurl
"
""
"HEAD"
"
$__request_conent_type
"
>
/dev/null
;
then
_headers
=
"
$(
cat
"
$HTTP_HEADER
"
)
"
_headers
=
"
$(
cat
"
$HTTP_HEADER
"
)
"
_debug2 _headers
"
$_headers
"
_debug2 _headers
"
$_headers
"
_CACHED_NONCE
=
"
$(
echo
"
$_headers
"
|
grep
-i
"Replay-Nonce:"
| _head_n 1 |
tr
-d
"
\r\n
"
|
cut
-d
':'
-f
2
)
"
_CACHED_NONCE
=
"
$(
echo
"
$_headers
"
|
grep
-i
"Replay-Nonce:"
| _head_n 1 |
tr
-d
"
\r\n
"
|
cut
-d
':'
-f
2
)
"
...
...
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