diff options
author | Russ Cox <rsc@golang.org> | 2009-06-29 15:24:23 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-06-29 15:24:23 -0700 |
commit | 755e009ad2a874373454d488f9ea46648a8a9547 (patch) | |
tree | ed3d700304a76b08cdca0f356605077c58ee0f76 /src/pkg/http/triv.go | |
parent | 24323437280c7f0a166b7f2fae75620470cde0f9 (diff) | |
download | golang-755e009ad2a874373454d488f9ea46648a8a9547.tar.gz |
io.StringBytes -> strings.Bytes
io.ByteBuffer -> bytes.Buffer
left io.ByteBuffer stub around for now,
for protocol compiler.
R=r
OCL=30861
CL=30872
Diffstat (limited to 'src/pkg/http/triv.go')
-rw-r--r-- | src/pkg/http/triv.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/http/triv.go b/src/pkg/http/triv.go index fc9501769..546f2a75d 100644 --- a/src/pkg/http/triv.go +++ b/src/pkg/http/triv.go @@ -5,6 +5,7 @@ package main import ( + "bytes"; "bufio"; "exvar"; "flag"; @@ -41,7 +42,7 @@ func (ctr *Counter) ServeHTTP(c *http.Conn, req *http.Request) { case "GET": ctr.n++; case "POST": - buf := new(io.ByteBuffer); + buf := new(bytes.Buffer); io.Copy(req.Body, buf); body := string(buf.Data()); if n, err := strconv.Atoi(body); err != nil { |