fix(startup): add empty body and timeout to webmention poller curl

The bodyless POST (no Content-Type/Content-Length) caused curl error 52
(empty reply from server). Adding `-d ""` sends proper headers and
`--max-time 300` prevents hangs on long-running webmention processing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sven
2026-03-17 12:18:20 +01:00
parent c1f9d64401
commit 4955863bb8

View File

@@ -88,7 +88,7 @@ WEBMENTION_ORIGIN="${PUBLICATION_URL:-${SITE_URL:-}}"
)" )"
if [ -n "$TOKEN" ]; then if [ -n "$TOKEN" ]; then
RESULT="$(curl -sS -X POST "${WEBMENTION_ENDPOINT}?token=${TOKEN}" 2>&1 || true)" RESULT="$(curl -sS --max-time 300 -X POST -d "" "${WEBMENTION_ENDPOINT}?token=${TOKEN}" 2>&1 || true)"
echo "[webmention] $(date '+%Y-%m-%d %H:%M:%S') - ${RESULT:-ok}" echo "[webmention] $(date '+%Y-%m-%d %H:%M:%S') - ${RESULT:-ok}"
else else
echo "[webmention] $(date '+%Y-%m-%d %H:%M:%S') - token generation failed" echo "[webmention] $(date '+%Y-%m-%d %H:%M:%S') - token generation failed"