]> 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)
committerStephan Bosch <stephan@dovecot.fi>
Mon, 20 Jun 2016 00:31:22 +0000 (02:31 +0200)
src/lib-http/http-server-connection.c

index 34aaf9549c593847d56e91a9a4e4afea5143c975..14686afe48734a14639050251a3e7923ecff2f4e 100644 (file)
@@ -834,15 +834,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);
                }
                
@@ -875,6 +880,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);
@@ -964,9 +971,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);
                }
        }