Don't attempt to parse bodies that only contain spaces. #309

Merged
merged 1 commit into from Aug 22, 2012
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Diff settings

Always

Just for now

@@ -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