1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-30 06:12:15 +02:00
chenwanli 2018-12-05 14:06:16 +08:00
parent 060ce1d9a2
commit 31038acccf

View file

@ -92,6 +92,12 @@ func upload_content(uploadUrl string, fillBufferFunction func(w io.Writer) error
return nil, post_err
}
defer resp.Body.Close()
if resp.StatusCode < http.StatusOK ||
resp.StatusCode > http.StatusIMUsed {
return nil, errors.New(http.StatusText(resp.StatusCode))
}
etag := getEtag(resp)
resp_body, ra_err := ioutil.ReadAll(resp.Body)
if ra_err != nil {