aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/http/fs.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/http/fs.go')
-rw-r--r--src/pkg/http/fs.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/http/fs.go b/src/pkg/http/fs.go
index e8dda1d30d..b56a101554 100644
--- a/src/pkg/http/fs.go
+++ b/src/pkg/http/fs.go
@@ -58,7 +58,7 @@ func dirList(c *Conn, f *os.File) {
if err != nil || len(dirs) == 0 {
break
}
- for i, d := range dirs {
+ for _, d := range dirs {
name := d.Name;
if d.IsDirectory() {
name += "/"
@@ -141,7 +141,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.ReadFull(f, &buf);
+ n, _ := io.ReadFull(f, &buf);
b := buf[0:n];
if isText(b) {
c.SetHeader("Content-Type", "text-plain; charset=utf-8");