Permalink
Browse files

Merge pull request #309 from twoism/support_for_head_responses

Don't attempt to parse bodies that only contain spaces.
  • Loading branch information...
2 parents 123b691 + 2a191ea commit d4318f4fa32ec0eef5e54e4af082d84096c52a4e @sferik committed Aug 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/twitter/response/parse_json.rb
@@ -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

0 comments on commit d4318f4

Please sign in to comment.