summaryrefslogtreecommitdiff
path: root/src/lib/http/fs.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-04-19 21:02:29 -0700
committerRob Pike <r@golang.org>2009-04-19 21:02:29 -0700
commit90bffe62a9ceb5828e83b97b87db1cf52e87a9ee (patch)
tree1b5c73c89b144a1dcf29333bd896fa1e15704e86 /src/lib/http/fs.go
parentbb20702e5106e1ffea9a34629367312cc43acef7 (diff)
downloadgolang-90bffe62a9ceb5828e83b97b87db1cf52e87a9ee.tar.gz
Readn is a silly name when there's no n. Change to FullRead.
R=gri DELTA=15 (0 added, 0 deleted, 15 changed) OCL=27619 CL=27619
Diffstat (limited to 'src/lib/http/fs.go')
-rw-r--r--src/lib/http/fs.go2
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");