From fb59b0d8c4002c4bab454b81f82d8d8bbde376bb Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Fri, 6 Jan 2023 22:45:56 +0100 Subject: [PATCH] Using 504 instead of 503 --- src/lib/proxy.c | 4 ++-- src/worker/fastcgi_handler.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/proxy.c b/src/lib/proxy.c index 04958e5..7422732 100644 --- a/src/lib/proxy.c +++ b/src/lib/proxy.c @@ -329,7 +329,7 @@ int proxy_init(proxy_ctx_t **proxy_ptr, http_req *req, http_res *res, http_statu if (host_ent == NULL) { host_ent = gethostbyname2(conf->proxy.hostname, AF_INET); if (host_ent == NULL) { - res->status = http_get_status(503); + res->status = http_get_status(504); ctx->origin = SERVER_REQ; error("Unable to connect to server: Name or service not known"); sprintf(err_msg, "Unable to connect to server: Name or service not known."); @@ -354,7 +354,7 @@ int proxy_init(proxy_ctx_t **proxy_ptr, http_req *req, http_res *res, http_statu res->status = http_get_status(504); ctx->origin = SERVER_REQ; } else if (errno == ECONNREFUSED) { - res->status = http_get_status(503); + res->status = http_get_status(504); ctx->origin = SERVER_REQ; } else { res->status = http_get_status(500); diff --git a/src/worker/fastcgi_handler.c b/src/worker/fastcgi_handler.c index 69ae4b5..a8dd22a 100644 --- a/src/worker/fastcgi_handler.c +++ b/src/worker/fastcgi_handler.c @@ -63,7 +63,7 @@ static int fastcgi_handler_1(client_ctx_t *ctx, fastcgi_cnx_t *fcgi_cnx) { res->status = http_get_status(200); if (fastcgi_init(fcgi_cnx, mode, ctx->req_num, client, req, uri) != 0) { - res->status = http_get_status(503); + res->status = http_get_status(504); sprintf(err_msg, "Unable to communicate with FastCGI socket."); return 2; }