Skip to content

Commit 619ddfb

Browse files
committed
Log the reasons of failures in the connection setup stage
1 parent 37a8f09 commit 619ddfb

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

cherokee/connection.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,6 +2396,8 @@ cherokee_connection_check_ip_validation (cherokee_connection_t *conn, cherokee_c
23962396
}
23972397

23982398
conn->error_code = http_access_denied;
2399+
LOG_ERROR_S(CHEROKEE_ERROR_CONNECTION_INVALID_IP);
2400+
23992401
return ret_error;
24002402
}
24012403

@@ -2440,6 +2442,7 @@ cherokee_connection_check_http_method (cherokee_connection_t *conn, cherokee_con
24402442
conn->header.method = http_get;
24412443
}
24422444

2445+
LOG_ERROR_S(CHEROKEE_ERROR_CONNECTION_HTTPD_METHOD);
24432446
return ret_error;
24442447
}
24452448

cherokee/error_list.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,14 @@
985985
title = "The connection's user (%s) is not valid, please check the configuration.",
986986
desc = BROKEN_CONFIG)
987987

988+
e('CONNECTION_INVALID_IP',
989+
title = "The connection's IP is invalid: please check IP or subnet configuration.",
990+
desc = BROKEN_CONFIG)
991+
992+
e('CONNECTION_HTTPD_METHOD',
993+
title = "The connection's HTTP method is not allowed.",
994+
desc = BROKEN_CONFIG)
995+
988996
e('CONNECTION_AUTH',
989997
title = "Unknown authentication method",
990998
desc = BROKEN_CONFIG)

0 commit comments

Comments
 (0)