Skip to content

Commit

Permalink
Merge pull request #6 from cherepets/master
Browse files Browse the repository at this point in the history
HTTP headers should be case-insensetive
  • Loading branch information
StefH authored Apr 27, 2017
2 parents 4106b2d + 11244fe commit 45830d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/NETStandard.HttpListener/HttpListenerHeaders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public class HttpListenerHeaders : Dictionary<string, string>

private HttpListenerResponse _response;

public HttpListenerHeaders() : base(StringComparer.OrdinalIgnoreCase)
{ }

internal void ParseHeaderLines(IEnumerable<string> lines)
{
foreach (var headerLine in lines)
Expand Down Expand Up @@ -57,7 +60,7 @@ public long ContentLength
{
return int.Parse(headerValue);
}
return -1;
return 0;
}

var response = GetResponse();
Expand Down

0 comments on commit 45830d7

Please sign in to comment.