]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: server: Added more detailed debugging about when idle timeouts are started...
authorStephan Bosch <stephan@dovecot.fi>
Sun, 19 Jun 2016 20:35:43 +0000 (22:35 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 20 Jun 2016 17:48:40 +0000 (20:48 +0300)
src/lib-http/http-server-connection.c

index be3d39055e038f91e6126e716f4210c98336a793..5ecd6b4a1cc379edac68b493d6afb4faba03a847 100644 (file)
@@ -811,15 +811,20 @@ http_server_connection_next_response(struct http_server_connection *conn)
        req = conn->request_queue_head;
        if (req == NULL) {
                /* no requests pending */
+               http_server_connection_debug(conn, "No more requests pending");
                http_server_connection_timeout_start(conn);
                return FALSE;
        }
        if (req->state < HTTP_SERVER_REQUEST_STATE_READY_TO_RESPOND) {
                if (req->state == HTTP_SERVER_REQUEST_STATE_PROCESSING) {
                        /* server is causing idle time */
+                       http_server_connection_debug(conn,
+                               "Not ready to respond: Server is processing");
                        http_server_connection_timeout_stop(conn);
                } else {
                        /* client is causing idle time */
+                       http_server_connection_debug(conn,
+                               "Not ready to respond: Waiting for client");
                        http_server_connection_timeout_start(conn);
                }
                
@@ -852,6 +857,8 @@ http_server_connection_next_response(struct http_server_connection *conn)
        i_assert(req->state == HTTP_SERVER_REQUEST_STATE_READY_TO_RESPOND &&
                req->response != NULL);
 
+       http_server_connection_debug(conn,
+               "Sending response");
        http_server_connection_timeout_start(conn);
 
        http_server_request_ref(req);
@@ -940,9 +947,15 @@ int http_server_connection_output(struct http_server_connection *conn)
                                return -1;
                } else if (conn->io_resp_payload != NULL) {
                        /* server is causing idle time */
+                       http_server_connection_debug(conn,
+                               "Not ready to continue response: "
+                               "Server is producing response");
                        http_server_connection_timeout_stop(conn);
                } else {
                        /* client is causing idle time */
+                       http_server_connection_debug(conn,
+                               "Not ready to continue response: "
+                               "Waiting for client");
                        http_server_connection_timeout_start(conn);
                }
        }