release 1.27.0: exchange /keys trailing-slash WARN + docs links

This commit is contained in:
Hernâni Marques 2026-09-05 20:31:40 +02:00
parent b5602b261f
commit fb62791a05
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
5 changed files with 31 additions and 2 deletions

View file

@ -219,6 +219,22 @@ if [ "${LOCAL_STACK:-1}" = "1" ]; then
else
check_url_soft "exchange /keys" 200 "$EXCHANGE_PUBLIC/keys"
fi
# Trailing-slash twin: docs define GET {base_url}keys with base_url ending in /
# (https://docs.taler.net/core/api-exchange.html#get--keys ,
# https://docs.taler.net/core/api-common.html — WebURL/base URL).
# /keys vs /keys/ disagreement is usually a reverse-proxy quirk → WARN, not ERROR
# (bare /keys remaining 200 is enough for wallets).
code_keys=$(http_code "$EXCHANGE_PUBLIC/keys")
code_keys_slash=$(http_code "$EXCHANGE_PUBLIC/keys/")
if [ "$code_keys" = "200" ] && [ "$code_keys_slash" = "200" ]; then
ok "exchange /keys trailing-slash" "both /keys and /keys/ → 200"
elif [ "$code_keys" = "200" ] && [ "$code_keys_slash" != "200" ]; then
warn "exchange /keys trailing-slash" \
"/keys=200 /keys/=$code_keys_slash (proxy slash quirk; see docs.taler.net exchange GET /keys)"
elif [ "$code_keys" != "200" ] && [ "$code_keys_slash" = "200" ]; then
warn "exchange /keys trailing-slash" \
"/keys=$code_keys /keys/=200 (prefer bare /keys; check Caddy/nginx)"
fi
# /keys should also expose currency_specification.alt_unit_names when present
code=$(http_body "$EXCHANGE_PUBLIC/keys" "$tmp/ek.json")
if [ "$code" = "200" ]; then