aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/http/client.go')
-rw-r--r--src/net/http/client.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/net/http/client.go b/src/net/http/client.go
index 10f5684a79..f8ab675a3d 100644
--- a/src/net/http/client.go
+++ b/src/net/http/client.go
@@ -110,10 +110,6 @@ type RoundTripper interface {
RoundTrip(*Request) (*Response, error)
}
-// Given a string of the form "host", "host:port", or "[ipv6::address]:port",
-// return true if the string includes a port.
-func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") }
-
// refererForURL returns a referer without any authentication info or
// an empty string if lastReq scheme is https and newReq scheme is http.
func refererForURL(lastReq, newReq *url.URL) string {
@@ -475,6 +471,7 @@ func (c *Client) doFollowingRedirects(req *Request, shouldRedirect func(int) boo
URL: u,
Header: make(Header),
Cancel: ireq.Cancel,
+ ctx: ireq.ctx,
}
if ireq.Method == "POST" || ireq.Method == "PUT" {
req.Method = "GET"