aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Net.Http/src/Core/HttpServerProcessing.cs40
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/Net.Http/src/Core/HttpServerProcessing.cs b/lib/Net.Http/src/Core/HttpServerProcessing.cs
index d054755..5056d35 100644
--- a/lib/Net.Http/src/Core/HttpServerProcessing.cs
+++ b/lib/Net.Http/src/Core/HttpServerProcessing.cs
@@ -166,10 +166,29 @@ namespace VNLib.Net.Http
bool keepalive = await ProcessRequestAsync(context, (HttpStatusCode)status);
#if DEBUG
+ static void WriteConnectionDebugLog(HttpServer server, HttpContext context)
+ {
+ //Alloc debug buffer
+ using IMemoryHandle<char> debugBuffer = MemoryUtil.SafeAlloc<char>(16 * 1024);
+
+ ForwardOnlyWriter<char> writer = new (debugBuffer.Span);
+
+ //Request
+ context.Request.Compile(ref writer);
+
+ //newline
+ writer.Append("\r\n");
+
+ //Response
+ context.Response.Compile(ref writer);
+
+ server.Config.RequestDebugLog!.Verbose("\r\n{dbg}", writer.ToString());
+ }
+
//Write debug response log
if(Config.RequestDebugLog != null)
{
- WriteConnectionDebugLog(context);
+ WriteConnectionDebugLog(this, context);
}
#endif
@@ -189,25 +208,6 @@ namespace VNLib.Net.Http
}
}
- private void WriteConnectionDebugLog(HttpContext context)
- {
- //Alloc debug buffer
- using IMemoryHandle<char> debugBuffer = MemoryUtil.SafeAlloc<char>(16 * 1024);
-
- ForwardOnlyWriter<char> writer = new (debugBuffer.Span);
-
- //Request
- context.Request.Compile(ref writer);
-
- //newline
- writer.Append("\r\n");
-
- //Response
- context.Response.Compile(ref writer);
-
- Config.RequestDebugLog!.Verbose("\r\n{dbg}", writer.ToString());
- }
-
/// <summary>
/// Reads data synchronously from the transport and attempts to parse an HTTP message and
/// built a request.