Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: sferik/twitter
...
head fork: sferik/twitter
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Aug 22, 2012
@twoism twoism Don't attempt to parse bodies that only contain spaces.
  Rails 2.x head responses return a single space as
  the body. This is due to a Safari bug where the headers
  are not passed if the content length is zero.
2a191ea
@sferik Merge pull request #309 from twoism/support_for_head_responses
Don't attempt to parse bodies that only contain spaces.
d4318f4
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/twitter/response/parse_json.rb
View
2  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

No commit comments for this range

Something went wrong with that request. Please try again.