mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-05 20:51:48 +02:00
Fixes #559 : when HTTP/2 is used, header names are lower case. So adding ignore case option (-i) to grep's.
This commit is contained in:
+3
-3
@@ -409,7 +409,7 @@ init_system() {
|
|||||||
if [[ ${API} -eq 1 ]]; then
|
if [[ ${API} -eq 1 ]]; then
|
||||||
_exiterr "This is not implemented for ACMEv1! Consider switching to ACMEv2 :)"
|
_exiterr "This is not implemented for ACMEv1! Consider switching to ACMEv2 :)"
|
||||||
else
|
else
|
||||||
ACCOUNT_URL="$(signed_request "${CA_NEW_ACCOUNT}" '{"onlyReturnExisting": true}' 4>&1 | grep ^Location: | awk '{print $2}' | tr -d '\r\n')"
|
ACCOUNT_URL="$(signed_request "${CA_NEW_ACCOUNT}" '{"onlyReturnExisting": true}' 4>&1 | grep -i ^Location: | awk '{print $2}' | tr -d '\r\n')"
|
||||||
ACCOUNT_INFO="$(signed_request "${ACCOUNT_URL}" '{}')"
|
ACCOUNT_INFO="$(signed_request "${ACCOUNT_URL}" '{}')"
|
||||||
fi
|
fi
|
||||||
ACCOUNT_ID="${ACCOUNT_URL##*/}"
|
ACCOUNT_ID="${ACCOUNT_URL##*/}"
|
||||||
@@ -579,9 +579,9 @@ signed_request() {
|
|||||||
|
|
||||||
# Retrieve nonce from acme-server
|
# Retrieve nonce from acme-server
|
||||||
if [[ ${API} -eq 1 ]]; then
|
if [[ ${API} -eq 1 ]]; then
|
||||||
nonce="$(http_request head "${CA}" | grep Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
|
nonce="$(http_request head "${CA}" | grep -i Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
|
||||||
else
|
else
|
||||||
nonce="$(http_request head "${CA_NEW_NONCE}" | grep Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
|
nonce="$(http_request head "${CA_NEW_NONCE}" | grep -i Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build header with just our public key and algorithm information
|
# Build header with just our public key and algorithm information
|
||||||
|
|||||||
Reference in New Issue
Block a user