Browse Source

Pass the head option to curl

When curl is using http1/1 and "-X HEAD", curl may hang on the new-nonce
request from
https://acme-staging-v02.api.letsencrypt.org/acme/new-nonce
pull/2499/head
Trey Valenta 6 years ago
parent
commit
cba97c58d5
  1. 2
      acme.sh

2
acme.sh

@ -1878,7 +1878,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 --head" "$__request_conent_type"; 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)"

Loading…
Cancel
Save