Commit 97154d8d authored by Shani Elharrar's avatar Shani Elharrar

Fixed parsing of post headers which has errors

parent 1f4d3eeb
......@@ -22,8 +22,12 @@ namespace uhttpsharp.Headers
for (int i = 0; i < splittedKeyValues.Length; i += 2)
{
var key = Uri.UnescapeDataString(splittedKeyValues[i]);
var value = Uri.UnescapeDataString(splittedKeyValues[i + 1]).Replace('+', ' ');
string value = null;
if (splittedKeyValues.Length > i + 1)
{
value = Uri.UnescapeDataString(splittedKeyValues[i + 1]).Replace('+', ' ');
}
values[key] = value;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment