diff options
Diffstat (limited to 'src/pkg/http/fs.go')
-rw-r--r-- | src/pkg/http/fs.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/http/fs.go b/src/pkg/http/fs.go index 309dd8274..40bb3d138 100644 --- a/src/pkg/http/fs.go +++ b/src/pkg/http/fs.go @@ -131,7 +131,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, _ := io.ReadFull(f, &buf) + n, _ := io.ReadFull(f, buf[0:]) b := buf[0:n] if isText(b) { c.SetHeader("Content-Type", "text-plain; charset=utf-8") |