]> source.dussan.org Git - rspamd.git/commitdiff
Log HTTP actions.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 1 Sep 2014 13:17:12 +0000 (14:17 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 1 Sep 2014 13:17:12 +0000 (14:17 +0100)
src/libutil/http.c

index 85e3e8540d8322b699b657974a462d4fead8ad59..1452ce163ad59f4f2614b6758c51beb396984d95 100644 (file)
@@ -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;