Using more diverse HTTP codes
This commit is contained in:
@ -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(504);
|
||||
res->status = http_get_status(503);
|
||||
sprintf(err_msg, "Unable to communicate with FastCGI socket.");
|
||||
return 2;
|
||||
}
|
||||
|
@ -169,10 +169,7 @@ static int request_handler(client_ctx_t *ctx) {
|
||||
|
||||
ctx->conf = get_host_config(ctx->req_host);
|
||||
if (ctx->conf == NULL) {
|
||||
info("Unknown host, redirecting to default");
|
||||
res->status = http_get_status(307);
|
||||
sprintf(buf0, "https://%s%s", DEFAULT_HOST, req->uri);
|
||||
http_add_header_field(&res->hdr, "Location", buf0);
|
||||
res->status = http_get_status(421);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user