jgauffin / Griffin.WebServer

A web server built on top of Griffin.Framework
106 stars 43 forks source link

ErrorModule bug #26

Closed wo80 closed 8 years ago

wo80 commented 8 years ago

In method SetErrorPage (line 97): Instead of

httpContext.Response.Body = new MemoryStream();
httpContext.Response.Body.Write(bytes, 0, bytes.Length);

you should do

httpContext.Response.Body = new MemoryStream(bytes);

since Body.Position should be 0 when sending the response.

EDIT: Additionally, the Response.ContentLength should be set to the correct size.

jgauffin commented 8 years ago

corrected. thanks and apologies for the late reply.