Compare commits
2 Commits
5f3cd03a6f
...
0a1fb977d6
Author | SHA1 | Date | |
---|---|---|---|
0a1fb977d6
|
|||
1405036cf2
|
@@ -24,7 +24,7 @@ const http_status http_statuses[] = {
|
||||
{206, HTTP_TYPE_SUCCESS, "Partial Content"},
|
||||
{207, HTTP_TYPE_SUCCESS, "Multi-Status"},
|
||||
{208, HTTP_TYPE_SUCCESS, "Already Reported"},
|
||||
{226, HTTP_TYPE_SUCCESS, "IM Used"},
|
||||
{226, HTTP_TYPE_SUCCESS, "Instance Manipulation Used"},
|
||||
|
||||
{300, HTTP_TYPE_REDIRECTION, "Multiple Choices"},
|
||||
{301, HTTP_TYPE_REDIRECTION, "Moved Permanently"},
|
||||
|
@@ -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(504);
|
||||
res->status = http_get_status(502);
|
||||
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(504);
|
||||
res->status = http_get_status(502);
|
||||
ctx->origin = SERVER_REQ;
|
||||
} else {
|
||||
res->status = http_get_status(500);
|
||||
|
@@ -170,6 +170,7 @@ static int request_handler(client_ctx_t *ctx) {
|
||||
ctx->conf = get_host_config(ctx->req_host);
|
||||
if (ctx->conf == NULL) {
|
||||
res->status = http_get_status(421);
|
||||
strcpy(ctx->err_msg, "The requested host name is not configured on the server.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user