You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If using gem 'right_aws' v3.1.0 side-by-side with Twitter gem 4.8.1 and Ruby 2.0 I got the following error for a status call:
"unexpected token at '\x1F\x8B\b' ...gems/json-1.8.1/lib/json/common.rb:155:in 'parse'"
Inspired by flexera-public/right_aws#167 I wrote a little monkey patch for Twitter to work with Ruby 2.0 + gzip response.
moduleTwittermoduleResponseclassParseJson < Faraday::Response::Middlewaredefon_complete(env)ifrespond_to?(:parse)ifenv[:response_headers]['content-encoding'].include?("gzip")# PATCH for zipped databody=StringIO.new(env[:body])string=Zlib::GzipReader.new(body).readenv[:body]=parse(string)unless[204,301,302,304].include?(env[:status])else# defaultenv[:body]=parse(env[:body])unless[204,301,302,304].include?(env[:status])endendendendendend
Hope this helps. Maybe it's just a 'aws_right' issue, because without this gem everything works fine...
The text was updated successfully, but these errors were encountered:
tilljoel
pushed a commit
to tilljoel/bs
that referenced
this issue
Nov 4, 2013
If using gem 'right_aws' v3.1.0 side-by-side with Twitter gem 4.8.1 and Ruby 2.0 I got the following error for a status call:
"unexpected token at '\x1F\x8B\b' ...gems/json-1.8.1/lib/json/common.rb:155:in 'parse'"
Inspired by flexera-public/right_aws#167 I wrote a little monkey patch for Twitter to work with Ruby 2.0 + gzip response.
Hope this helps. Maybe it's just a 'aws_right' issue, because without this gem everything works fine...
The text was updated successfully, but these errors were encountered: