Skip to content

Commit

Permalink
Do not attempt to parse redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Burnett authored and sferik committed Sep 17, 2012
1 parent 1e6ad05 commit 2829710
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/twitter/response/parse_json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def parse(body)

def on_complete(env)
if respond_to?(:parse)
env[:body] = parse(env[:body]) unless [204, 304].include?(env[:status])
env[:body] = parse(env[:body]) unless [204, 301, 302, 304].include?(env[:status])
end
end

Expand Down

0 comments on commit 2829710

Please sign in to comment.