From: Jan Engelhardt Date: Thu, 02 Dec 2021 00:12:37 GMT Subject: [PATCH 1/2] http-backend: CGI error messages need to be output on stdout Message-ID: <20211202001238.21808-1-jengelh@inai.de> Accessing a clone-only URL with a browser would always show a blank page, because the reason string "Request is not supported" was sent to the wrong file descriptor. Signed-off-by: Jan Engelhardt --- http-backend.c | 4 ++-- t/t5561-http-backend.sh | 46 ++++++++++++++++++++--------------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git http-backend.c http-backend.c index 3d6e2ff17f..8f1b69d127 100644 --- http-backend.c +++ http-backend.c @@ -134,7 +134,7 @@ static NORETURN void not_found(struct strbuf *hdr, const char *err, ...) va_start(params, err); if (err && *err) - vfprintf(stderr, err, params); + vprintf(err, params); va_end(params); exit(0); } @@ -150,7 +150,7 @@ static NORETURN void forbidden(struct strbuf *hdr, const char *err, ...) va_start(params, err); if (err && *err) - vfprintf(stderr, err, params); + vprintf(err, params); va_end(params); exit(0); } diff --git t/t5561-http-backend.sh t/t5561-http-backend.sh index 9c57d84315..d8add36fb4 100755 --- t/t5561-http-backend.sh +++ t/t5561-http-backend.sh @@ -44,7 +44,7 @@ grep '^[^#]' >exp <