Feature #652

Log remote IP for message "request timed out after writing..."

Added by chernousov 930 days ago. Updated 345 days ago.

Status:New Start:
Priority:Normal Due date:
Assigned to:jan % Done:

0%

Category:core
Target version:-
Pending:

No

Resolution:


Description

Something like this would be very useful:

in server.c


xHome src # svn diff server.c
Index: server.c
===================================================================
--- server.c    (revision 1126)
+++ server.c    (working copy)
@@ -1144,7 +1144,8 @@
                                                if (srv->cur_ts - con->write_request_ts > con->conf.max_write_idle) {
                                                        /* time - out */
 #if 1
-                                                       log_error_write(srv, __FILE__, __LINE__, "sbsosds",
+                                                       log_error_write(srv, __FILE__, __LINE__, "ssbsosds",
+                                                                       inet_ntop_cache_get_ip(srv, &(con->dst_addr)),
                                                                        "NOTE: a request for",
                                                                        con->request.uri,
                                                                        "timed out after writing",

Also available in: Atom PDF