summaryrefslogtreecommitdiff
path: root/libgo/go/http/dump.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/http/dump.go')
-rw-r--r--libgo/go/http/dump.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/http/dump.go b/libgo/go/http/dump.go
index 73ac9797399..306c45bc2c9 100644
--- a/libgo/go/http/dump.go
+++ b/libgo/go/http/dump.go
@@ -7,10 +7,10 @@ package http
import (
"bytes"
"io"
+ "io/ioutil"
"os"
)
-
// One of the copies, say from b to r2, could be avoided by using a more
// elaborate trick where the other copy is made during Request/Response.Write.
// This would complicate things too much, given that these functions are for
@@ -23,7 +23,7 @@ func drainBody(b io.ReadCloser) (r1, r2 io.ReadCloser, err os.Error) {
if err = b.Close(); err != nil {
return nil, nil, err
}
- return nopCloser{&buf}, nopCloser{bytes.NewBuffer(buf.Bytes())}, nil
+ return ioutil.NopCloser(&buf), ioutil.NopCloser(bytes.NewBuffer(buf.Bytes())), nil
}
// DumpRequest returns the wire representation of req,