Created
March 22, 2013 01:27
-
-
Save waynepan/5218264 to your computer and use it in GitHub Desktop.
Twitter connect close issue patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# monkey patch to correct Twitter gem experiencing EOF errors | |
# thread here: https://dev.twitter.com/discussions/15989#comment-35662 | |
# add any where to your code before using the Twitter gem | |
module Twitter | |
class Client | |
def connection | |
@connection ||= Faraday.new(@endpoint, @connection_options.merge(:builder => @middleware)) do |f| | |
f.headers = { "Connection" => "" } | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the workaround! I would modify to keep the method private, and only change the key in the headers that is relevant: