diff --git a/tracer/test/Datadog.Trace.TestHelpers/MockHttpParser.cs b/tracer/test/Datadog.Trace.TestHelpers/MockHttpParser.cs index 62a2b04e0e59..dde5109cdda0 100644 --- a/tracer/test/Datadog.Trace.TestHelpers/MockHttpParser.cs +++ b/tracer/test/Datadog.Trace.TestHelpers/MockHttpParser.cs @@ -27,7 +27,8 @@ public static async Task ReadRequest(Stream stream) // Read POST await helper.ReadUntil(stringBuilder, stopChar: ' ').ConfigureAwait(false); - var method = stringBuilder.ToString(); + // This will have a null character prefixed on it because of reasons + var method = stringBuilder.ToString(1, stringBuilder.Length - 1); stringBuilder.Clear(); // Read /path?request