From 30ee1c733cfea091f60b18a51d01eab1d0cc6f30 Mon Sep 17 00:00:00 2001 From: Christopher Burnett Date: Wed, 29 Aug 2012 11:36:30 -0700 Subject: [PATCH] Do not attempt to parse redirects --- lib/twitter/response/parse_json.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/twitter/response/parse_json.rb b/lib/twitter/response/parse_json.rb index 3679fab72..c1a8f66c8 100644 --- a/lib/twitter/response/parse_json.rb +++ b/lib/twitter/response/parse_json.rb @@ -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