Skip to content

Commit

Permalink
missing some http error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
vikbez committed Jul 29, 2015
1 parent deae423 commit 4862956
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hfsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ func download(file_url string) (string, error) {
req, err := http.NewRequest("GET", full_url, nil)
req.SetBasicAuth(_G.UID, _G.Config.User.Name)
res, err := _G.HttpClient.Do(req)
if err != nil { return "", err }
defer res.Body.Close()
if res.StatusCode != 200 { return "", errors.New(res.Status) }

Expand Down

0 comments on commit 4862956

Please sign in to comment.