intridea/oauth2 — pull request #97 by rewritten (2012-03-16 14:07:07+00:00)
Title: Don't redirect on 304 and 308

Solves issue #96

When HTTP Status is 304, it's typically to respond to a If-Modified-Since header or similar. In this case no action should be taken, the resource to retrieve is already at the client side (otherwise she wouldn't have issued the request at all)

HTTP Status 308 (a Google extension) signals that a resumable request is correct, and gives in the 'Location' header the next url where to resume. This is used to upload files in chunks, and by no means the request should be repeated by the library. The user will make a new request with a new chunk of content, new Content-Range etc.