http_server_tunnel_callback_t tunnel_callback = resp->tunnel_callback;
void *tunnel_context = resp->tunnel_context;
+ i_assert(conn != NULL);
i_assert(req->state < HTTP_SERVER_REQUEST_STATE_FINISHED);
req->state = HTTP_SERVER_REQUEST_STATE_FINISHED;
+ if (conn->callbacks != NULL &&
+ conn->callbacks->request_finished != NULL)
+ conn->callbacks->request_finished(conn->context, req);
+
http_server_connection_remove_request(conn, req);
conn->stats.response_count++;
struct http_server_request *req,
struct http_url *target);
+ /* Called once a request is finished (response is sent). This also
+ catches requests that fail before the handle_request() callback is
+ reached. */
+ void (*request_finished)(void *context,
+ struct http_server_request *req);
+
/* Called once the connection is destroyed. */
void (*connection_destroy)(void *context, const char *reason);
};