mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-05 14:07:01 +00:00
nit picking of legacy
This commit is contained in:
parent
b759aaf673
commit
cba996978e
2 changed files with 2 additions and 4 deletions
|
@ -2,9 +2,7 @@ package context
|
|||
|
||||
import (
|
||||
stdContext "context"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Context struct {
|
||||
|
@ -41,7 +39,7 @@ func (c *Context) String(raw string, status ...int) {
|
|||
code = status[0]
|
||||
}
|
||||
c.RespWriter.WriteHeader(code)
|
||||
_, _ = io.Copy(c.RespWriter, strings.NewReader(raw))
|
||||
c.RespWriter.Write([]byte(raw))
|
||||
}
|
||||
|
||||
func (c *Context) IsMethod(m string) bool {
|
||||
|
|
|
@ -27,7 +27,7 @@ const (
|
|||
fileCacheTimeout = 5 * time.Minute
|
||||
|
||||
// fileCacheSizeLimit limits the maximum file size that will be cached, and is set to 1 MB by default.
|
||||
fileCacheSizeLimit = int64(1024 * 1024)
|
||||
fileCacheSizeLimit = int64(1000 * 1000)
|
||||
)
|
||||
|
||||
type FileResponse struct {
|
||||
|
|
Loading…
Reference in a new issue