From eea3c13994e42549c8bc3e0c6f0da6599f39cc8b Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 1 Sep 2014 14:17:12 +0100 Subject: [PATCH] Log HTTP actions. --- src/libutil/http.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libutil/http.c b/src/libutil/http.c index 85e3e8540..1452ce163 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -1267,7 +1267,7 @@ rspamd_http_router_try_file (struct rspamd_http_connection_entry *entry, rspamd_http_connection_reset (entry->conn); - /* XXX: detect content type */ + msg_info ("requested file %s", realbuf); rspamd_http_connection_write_message (entry->conn, reply_msg, NULL, rspamd_http_router_detect_ct (realbuf), entry, entry->conn->fd, entry->rt->ptv, entry->rt->ev_base); @@ -1297,6 +1297,7 @@ rspamd_http_router_finish_handler (struct rspamd_http_connection *conn, if (msg->url != NULL && msg->url->len != 0) { found = g_hash_table_lookup (entry->rt->paths, msg->url->str); memcpy (&handler, &found, sizeof (found)); + msg_info ("requested known path: %v", msg->url); } entry->is_reply = TRUE; if (handler != NULL) { @@ -1310,6 +1311,7 @@ rspamd_http_router_finish_handler (struct rspamd_http_connection *conn, if (entry->rt->error_handler != NULL) { entry->rt->error_handler (entry, err); } + msg_info ("requested unknown path: %v", msg->url); err_msg = rspamd_http_new_message (HTTP_RESPONSE); err_msg->date = time (NULL); err_msg->code = err->code; -- 2.39.5