1
0
mirror of https://github.com/golang/go synced 2024-11-20 10:24:40 -07:00

http: cleaned up HEAD request method.

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
This commit is contained in:
Padraig Kitterick 2011-02-22 10:40:37 +11:00 committed by Andrew Gerrand
parent c010b0e846
commit 1f39ed8a2d

View File

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