From 2bcdb5a5d9220f919413ce90ec92ba4ba9167fb7 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Tue, 23 Jun 2015 11:36:57 -0700 Subject: [PATCH] net/http: sync Get and Head's documentation Instead of ambiguously referring to "the Client's CheckRedirect function" in Head, describe the default behavior like for Get as users aren't expected to change DefaultClient.CheckRedirect. While here, use consistent punctuation for the Get and Head Client method documentation. Change-Id: I9e7046c73b0d0bc4de002234924d9e7c59aceb41 Reviewed-on: https://go-review.googlesource.com/11362 Reviewed-by: Brad Fitzpatrick --- src/net/http/client.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/net/http/client.go b/src/net/http/client.go index 1c5e1911e0..d5e3899fd3 100644 --- a/src/net/http/client.go +++ b/src/net/http/client.go @@ -283,7 +283,7 @@ func Get(url string) (resp *Response, err error) { // Get issues a GET to the specified URL. If the response is one of the // following redirect codes, Get follows the redirect after calling the -// Client's CheckRedirect function. +// Client's CheckRedirect function: // // 301 (Moved Permanently) // 302 (Found) @@ -497,9 +497,9 @@ func (c *Client) PostForm(url string, data url.Values) (resp *Response, err erro return c.Post(url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) } -// Head issues a HEAD to the specified URL. If the response is one of the -// following redirect codes, Head follows the redirect after calling the -// Client's CheckRedirect function. +// Head issues a HEAD to the specified URL. If the response is one of +// the following redirect codes, Head follows the redirect, up to a +// maximum of 10 redirects: // // 301 (Moved Permanently) // 302 (Found) @@ -513,7 +513,7 @@ func Head(url string) (resp *Response, err error) { // Head issues a HEAD to the specified URL. If the response is one of the // following redirect codes, Head follows the redirect after calling the -// Client's CheckRedirect function. +// Client's CheckRedirect function: // // 301 (Moved Permanently) // 302 (Found) -- 2.50.0