Commit 1f4d3eeb authored by Shani Elharrar's avatar Shani Elharrar

Fixed Raw Post Reading

parent af33f529
......@@ -45,9 +45,12 @@ namespace uhttpsharp.Headers
{
public static async Task<IHttpPost> Create(StreamReader reader, int postContentLength)
{
byte[] raw = new byte[postContentLength];
int readBytes = await reader.BaseStream.ReadAsync(raw, 0, postContentLength);
char[] rawEncoded = new char[postContentLength];
int readBytes = await reader.ReadAsync(rawEncoded, 0, rawEncoded.Length);
byte[] raw = Encoding.UTF8.GetBytes(rawEncoded, 0, readBytes);
return new HttpPost(raw, readBytes);
}
......
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