]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: improve Client.Timeout docs, quiet test
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 4 Mar 2014 21:41:05 +0000 (13:41 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 4 Mar 2014 21:41:05 +0000 (13:41 -0800)
LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/70930043

src/pkg/net/http/client.go
src/pkg/net/http/client_test.go

index ee0753d35e7091b03c72bb0a97deae98e2e74cdf..91d8fc8934f17ec0813f6155c17aef7897e8b99e 100644 (file)
@@ -56,12 +56,11 @@ type Client struct {
        // in responses.
        Jar CookieJar
 
-       // Timeout specifies the end-to-end timeout for requests made
-       // via this Client. The timeout includes connection time, any
-       // redirects, and reading the response body. The timeout
-       // remains running once Get, Head, Post, or Do returns and
-       // will interrupt the read of the Response.Body if EOF hasn't
-       // been reached.
+       // Timeout specifies a time limit for requests made by this
+       // Client. The timeout includes connection time, any
+       // redirects, and reading the response body. The timer remains
+       // running after Get, Head, Post, or Do return and will
+       // interrupt reading of the Response.Body.
        //
        // A Timeout of zero means no timeout.
        //
index 9bc5d57c924fa9261e850fd0ffc167f4b3fc8a1c..af92a9fe6a97736284d780be8838bd070d522981 100644 (file)
@@ -874,7 +874,7 @@ func TestClientTimeout(t *testing.T) {
                if err == nil {
                        t.Error("expected error from ReadAll")
                }
-               t.Logf("Got expected ReadAll error of %v after reading body %q", err, all)
+               // Expected error.
        case <-time.After(failTime):
                t.Errorf("timeout after %v waiting for timeout of %v", failTime, timeout)
        }