diff options
Diffstat (limited to 'src/pkg/net/http/client.go')
| -rw-r--r-- | src/pkg/net/http/client.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pkg/net/http/client.go b/src/pkg/net/http/client.go index 1d70672695..c9f0240175 100644 --- a/src/pkg/net/http/client.go +++ b/src/pkg/net/http/client.go @@ -116,6 +116,10 @@ func send(req *Request, t RoundTripper) (resp *Response, err error) { return nil, errors.New("http: nil Request.URL") } + if req.RequestURI != "" { + return nil, errors.New("http: Request.RequestURI can't be set in client requests.") + } + // Most the callers of send (Get, Post, et al) don't need // Headers, leaving it uninitialized. We guarantee to the // Transport that this has been initialized, though. |
