aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/net/http/cgi/child.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/http/cgi/child.go')
-rw-r--r--libgo/go/net/http/cgi/child.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/libgo/go/net/http/cgi/child.go b/libgo/go/net/http/cgi/child.go
index 61de616..0114da3 100644
--- a/libgo/go/net/http/cgi/child.go
+++ b/libgo/go/net/http/cgi/child.go
@@ -13,7 +13,6 @@ import (
"errors"
"fmt"
"io"
- "io/ioutil"
"net"
"net/http"
"net/url"
@@ -32,7 +31,7 @@ func Request() (*http.Request, error) {
return nil, err
}
if r.ContentLength > 0 {
- r.Body = ioutil.NopCloser(io.LimitReader(os.Stdin, r.ContentLength))
+ r.Body = io.NopCloser(io.LimitReader(os.Stdin, r.ContentLength))
}
return r, nil
}
@@ -146,6 +145,9 @@ func Serve(handler http.Handler) error {
if err != nil {
return err
}
+ if req.Body == nil {
+ req.Body = http.NoBody
+ }
if handler == nil {
handler = http.DefaultServeMux
}