This commit is contained in:
6543 2022-11-12 00:06:34 +01:00
parent f635c21c64
commit b759aaf673
No known key found for this signature in database
GPG Key ID: B8BE6D610E61C862
1 changed files with 1 additions and 2 deletions

View File

@ -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 {