From: Vsevolod Stakhov Date: Mon, 1 Sep 2014 13:17:12 +0000 (+0100) Subject: Log HTTP actions. X-Git-Tag: 0.7.0~56 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eea3c13994e42549c8bc3e0c6f0da6599f39cc8b;p=rspamd.git Log HTTP actions. --- 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;