]> Cypherpunks repositories - gostls13.git/commitdiff
http: cleaned up HEAD request method.
authorPadraig Kitterick <padraigkitterick@gmail.com>
Mon, 21 Feb 2011 23:40:37 +0000 (10:40 +1100)
committerAndrew Gerrand <adg@golang.org>
Mon, 21 Feb 2011 23:40:37 +0000 (10:40 +1100)
Removed a redefinition of the request URL which is never used and
redundant checking of the return value from send().

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4184061

src/pkg/http/client.go

index cc0ac323dc6ed336f6afab3bef08674c3c9fec70..56d8d836932c5ae6d024126fb6340bbbaa4f2913 100644 (file)
@@ -321,11 +321,7 @@ func Head(url string) (r *Response, err os.Error) {
        if req.URL, err = ParseURL(url); err != nil {
                return
        }
-       url = req.URL.String()
-       if r, err = send(&req); err != nil {
-               return
-       }
-       return
+       return send(&req)
 }
 
 type nopCloser struct {