Skip to content

Commit

Permalink
fix parse missing trim
Browse files Browse the repository at this point in the history
  • Loading branch information
tqk2811 committed Jul 27, 2024
1 parent 2953bf4 commit 638bb20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/TqkLibrary.Proxy/Helpers/HeaderRequestParse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static HeaderRequestParse ParseRequest(IEnumerable<string> lines)
.Select(x => x.Split(':'))
.Where(x => x.Length == 2))
{
nameValueCollection.Add(line[0].ToLower(), line[1]);
nameValueCollection.Add(line[0].Trim().ToLower(), line[1].Trim());
}

if (nameValueCollection.TryGetValues("proxy-connection", out string[]? proxy_connection))
Expand Down
2 changes: 1 addition & 1 deletion src/TqkLibrary.Proxy/Helpers/HeaderResponseParse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static HeaderResponseParse ParseResponse(IEnumerable<string> lines)
.Select(x => x.Split(':'))
.Where(x => x.Length == 2))
{
nameValueCollection.Add(line[0].ToLower(), line[1]);
nameValueCollection.Add(line[0].Trim().ToLower(), line[1].Trim());
}

if (nameValueCollection.TryGetValues("proxy-connection", out string[]? proxy_connection))
Expand Down

0 comments on commit 638bb20

Please sign in to comment.