Skip to content

Commit

Permalink
Merge pull request sferik#309 from twoism/support_for_head_responses
Browse files Browse the repository at this point in the history
Don't attempt to parse bodies that only contain spaces.
  • Loading branch information
sferik committed Aug 22, 2012
2 parents 123b691 + 2a191ea commit d4318f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/twitter/response/parse_json.rb
Expand Up @@ -7,7 +7,7 @@ class ParseJson < Faraday::Response::Middleware

def parse(body)
case body
when '', nil
when /\A^\s*$\z/, nil
nil
when 'true'
true
Expand Down

0 comments on commit d4318f4

Please sign in to comment.