diff options
Diffstat (limited to 'src/lib/http/fs.go')
-rw-r--r-- | src/lib/http/fs.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/http/fs.go b/src/lib/http/fs.go index 23a994aa0..c1e0ee699 100644 --- a/src/lib/http/fs.go +++ b/src/lib/http/fs.go @@ -142,7 +142,7 @@ func serveFileInternal(c *Conn, r *Request, name string, redirect bool) { } else { // read first chunk to decide between utf-8 text and binary var buf [1024]byte; - n, err := io.Readn(f, &buf); + n, err := io.FullRead(f, &buf); b := buf[0:n]; if isText(b) { c.SetHeader("Content-Type", "text-plain; charset=utf-8"); |