Skip to content

Commit

Permalink
Prepare 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
silentsokolov committed Nov 25, 2016
1 parent da536d3 commit d24bc5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions videos.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func uploadVideo(c *Client, url string, file *os.File) (*Video, *Response, error
switch nerr := err.(type) {
case net.Error:
if nerr.Timeout() {
lastByte, err = processUploadVideo(c, url)
lastByte, err = processUploadVideo(c, uploadVideo.UploadLinkSecure)
if err != nil {
return nil, nil, err
}
Expand All @@ -360,7 +360,7 @@ func uploadVideo(c *Client, url string, file *os.File) (*Video, *Response, error
return nil, nil, err
}
}
lastByte, err = processUploadVideo(c, url)
lastByte, err = processUploadVideo(c, uploadVideo.UploadLinkSecure)
if err != nil {
return nil, nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions vimeo.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

const (
libraryVersion = "1.0.0"
libraryVersion = "1.1.0"
defaultBaseURL = "https://api.vimeo.com/"
defaultUserAgent = "go-vimeo/" + libraryVersion

Expand Down Expand Up @@ -254,7 +254,7 @@ func newResponse(r *http.Response) *Response {
// body, or a JSON response body that maps to ErrorResponse. Any other
// response body will be silently ignored.
func CheckResponse(r *http.Response) error {
if code := r.StatusCode; 200 <= code && code <= 299 {
if code := r.StatusCode; 200 <= code && code <= 299 || code == 308 {
return nil
}

Expand Down

0 comments on commit d24bc5c

Please sign in to comment.