diff options
Diffstat (limited to 'src/pkg/http/triv.go')
| -rw-r--r-- | src/pkg/http/triv.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/http/triv.go b/src/pkg/http/triv.go index 23ec9849f..900dcbb5b 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.Bytes()); + body := buf.String(); if n, err := strconv.Atoi(body); err != nil { fmt.Fprintf(c, "bad POST: %v\nbody: [%v]\n", err, body); } else { |
