uHttpSharp icon indicating copy to clipboard operation
uHttpSharp copied to clipboard

.NET Standard: HTTP status line written after file content

Open Xenoage opened this issue 7 years ago • 0 comments

Hopefully this library will officially be ported to .NET Standard soon. jcaillon already did it, but there is a problem with the HttpResponse class, so maybe you can fix that early:

The FileHandler does not work in .NET Core, it returns the file content before the HTTP 1.1 ... status line and headers.

It can be fixed by inserting writer.Flush(); before await ContentStream.CopyToAsync(writer.BaseStream).ConfigureAwait(false); in HttpResponse.WriteBody.

Xenoage avatar Dec 13 '18 14:12 Xenoage