aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/fcgi
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/http/fcgi')
-rw-r--r--src/net/http/fcgi/child.go5
-rw-r--r--src/net/http/fcgi/fcgi_test.go5
2 files changed, 4 insertions, 6 deletions
diff --git a/src/net/http/fcgi/child.go b/src/net/http/fcgi/child.go
index 34761f32ee..e97b8440e1 100644
--- a/src/net/http/fcgi/child.go
+++ b/src/net/http/fcgi/child.go
@@ -11,7 +11,6 @@ import (
"errors"
"fmt"
"io"
- "io/ioutil"
"net"
"net/http"
"net/http/cgi"
@@ -186,7 +185,7 @@ func (c *child) serve() {
var errCloseConn = errors.New("fcgi: connection should be closed")
-var emptyBody = ioutil.NopCloser(strings.NewReader(""))
+var emptyBody = io.NopCloser(strings.NewReader(""))
// ErrRequestAborted is returned by Read when a handler attempts to read the
// body of a request that has been aborted by the web server.
@@ -325,7 +324,7 @@ func (c *child) serveRequest(req *request, body io.ReadCloser) {
// some sort of abort request to the host, so the host
// can properly cut off the client sending all the data.
// For now just bound it a little and
- io.CopyN(ioutil.Discard, body, 100<<20)
+ io.CopyN(io.Discard, body, 100<<20)
body.Close()
if !req.keepConn {
diff --git a/src/net/http/fcgi/fcgi_test.go b/src/net/http/fcgi/fcgi_test.go
index 4a27a12c35..d3b704f821 100644
--- a/src/net/http/fcgi/fcgi_test.go
+++ b/src/net/http/fcgi/fcgi_test.go
@@ -8,7 +8,6 @@ import (
"bytes"
"errors"
"io"
- "io/ioutil"
"net/http"
"strings"
"testing"
@@ -243,7 +242,7 @@ func TestChildServeCleansUp(t *testing.T) {
r *http.Request,
) {
// block on reading body of request
- _, err := io.Copy(ioutil.Discard, r.Body)
+ _, err := io.Copy(io.Discard, r.Body)
if err != tt.err {
t.Errorf("Expected %#v, got %#v", tt.err, err)
}
@@ -275,7 +274,7 @@ func TestMalformedParams(t *testing.T) {
// end of params
1, 4, 0, 1, 0, 0, 0, 0,
}
- rw := rwNopCloser{bytes.NewReader(input), ioutil.Discard}
+ rw := rwNopCloser{bytes.NewReader(input), io.Discard}
c := newChild(rw, http.DefaultServeMux)
c.serve()
}