diff --git a/html/error.go b/html/error.go index a1537e1..33b24c8 100644 --- a/html/error.go +++ b/html/error.go @@ -1,7 +1,6 @@ package html import ( - "io" "net/http" "strconv" "strings" @@ -22,7 +21,7 @@ func ReturnErrorPage(ctx *context.Context, msg string, statusCode int) { msg = strings.ReplaceAll(strings.ReplaceAll(ErrorPage, "%message%", msg), "%status%", http.StatusText(statusCode)) } - _, _ = io.Copy(ctx.RespWriter, strings.NewReader(msg)) + ctx.RespWriter.Write([]byte(msg)) } func errorMessage(statusCode int) string {