From 2055076187f2635039ba5acb18430f1f54885142 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 21 May 2021 09:29:00 +0200 Subject: send extra http header on expected failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Indicate that this failure is expected and pacman should not log an error and not increase the server error count. Looks like pacman will not support this... 😢 Let's add it anyway, may be handy. --- pacredir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pacredir.c b/pacredir.c index edae6fa..0366888 100644 --- a/pacredir.c +++ b/pacredir.c @@ -578,6 +578,7 @@ response: page = malloc(strlen(PAGE404) + strlen(basename) + 1); sprintf(page, PAGE404, basename); response = MHD_create_response_from_buffer(strlen(page), (void*) page, MHD_RESPMEM_MUST_FREE); + ret = MHD_add_response_header(response, "X-Pacman-Expected-Failure", "true"); ret = MHD_queue_response(connection, MHD_HTTP_NOT_FOUND, response); } -- cgit v1.2.3-54-g00ecf