summaryrefslogtreecommitdiff
path: root/src/pkg/http/triv.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/http/triv.go')
-rw-r--r--src/pkg/http/triv.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/http/triv.go b/src/pkg/http/triv.go
index 7b7484d3b..23ec9849f 100644
--- a/src/pkg/http/triv.go
+++ b/src/pkg/http/triv.go
@@ -43,7 +43,7 @@ func (ctr *Counter) ServeHTTP(c *http.Conn, req *http.Request) {
case "POST":
buf := new(bytes.Buffer);
io.Copy(req.Body, buf);
- body := string(buf.Data());
+ body := string(buf.Bytes());
if n, err := strconv.Atoi(body); err != nil {
fmt.Fprintf(c, "bad POST: %v\nbody: [%v]\n", err, body);
} else {