From 810c6c913e7f370d1902fc5ab805a61904bb2067 Mon Sep 17 00:00:00 2001 From: uwaa Date: Mon, 2 Dec 2024 16:19:22 +0000 Subject: [PATCH] http: add client info to OnResponse --- HTTP/HttpServer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HTTP/HttpServer.cs b/HTTP/HttpServer.cs index 928567a..5f2746c 100644 --- a/HTTP/HttpServer.cs +++ b/HTTP/HttpServer.cs @@ -48,7 +48,7 @@ public sealed class HttpServer /// /// Called when a request has been served a response. /// - public event Action? OnResponse; + public event Action? OnResponse; /// /// Called when a request causes an exception. @@ -160,7 +160,7 @@ public sealed class HttpServer //Execute HttpResponse? response = (await Router.GetResponse(req, clientInfo, pathSpl)) ?? HttpResponse.NotFound("Router produced no response"); - OnResponse?.Invoke(req, response); + OnResponse?.Invoke(req, clientInfo, response); await response.WriteTo(httpStream).WaitAsync(Timeout); if (response is SwitchingProtocols swp)