Closed wo80 closed 8 years ago
In method SetErrorPage (line 97): Instead of
SetErrorPage
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.
Body.Position
EDIT: Additionally, the Response.ContentLength should be set to the correct size.
Response.ContentLength
corrected. thanks and apologies for the late reply.
In method
SetErrorPage
(line 97): Instead ofyou should do
since
Body.Position
should be 0 when sending the response.EDIT: Additionally, the
Response.ContentLength
should be set to the correct size.