From 5b6e56f0a1f01abf2603af2e6b02fcaa95f0b5b5 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 19 May 2013 22:21:55 -0400 Subject: [PATCH] little fix --- doc/http.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/http.go b/doc/http.go index 5b9494e34..58e574735 100644 --- a/doc/http.go +++ b/doc/http.go @@ -18,7 +18,7 @@ import ( var userAgent = "go application" var ( - dialTimeout = flag.Duration("dial_timeout", 5*time.Second, "Timeout for dialing an HTTP connection.") + dialTimeout = flag.Duration("dial_timeout", 30*time.Second, "Timeout for dialing an HTTP connection.") readTimeout = flag.Duration("read_timeout", 10*time.Second, "Timeoout for reading an HTTP response.") writeTimeout = flag.Duration("write_timeout", 5*time.Second, "Timeout writing an HTTP request.") ) @@ -77,6 +77,7 @@ func httpGet(client *http.Client, url string, header http.Header) (io.ReadCloser if err != nil { return nil, &RemoteError{req.URL.Host, err} } + if resp.StatusCode == 200 { return resp.Body, nil }