diff options
author | Christian Hesse <mail@eworm.de> | 2021-05-21 09:29:00 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2022-03-29 11:27:06 +0200 |
commit | 2055076187f2635039ba5acb18430f1f54885142 (patch) | |
tree | 36fba62fd470a754e32a5d1025899679d1371aa7 | |
parent | a4617f1f6f75e417165b6c81a208dfe9ee324d86 (diff) | |
download | pacredir-2055076187f2635039ba5acb18430f1f54885142.tar.gz pacredir-2055076187f2635039ba5acb18430f1f54885142.tar.zst |
send extra http header on expected failure
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.
-rw-r--r-- | pacredir.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); } |