Skip to content

Commit

Permalink
Fix for MockHttpParser incorrectly prefixing a null character
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlock committed Dec 21, 2023
1 parent 941fc0a commit 880fb92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tracer/test/Datadog.Trace.TestHelpers/MockHttpParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public static async Task<MockHttpRequest> 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
Expand Down

0 comments on commit 880fb92

Please sign in to comment.