-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change to HTTP gem dependency breaks Twitter::Streaming::Connection v6 #709
Comments
hi @davebell, thanks for reporting this. I've fixed this in the |
Hey @stve, I'm experiencing this problem. Is there any word on getting the |
@davidcelis what branch are you running against? or are you using v5 of the gem? The |
Was cfa146c related to this issue? |
A quick-n-dirty fix is to hardcode the port on line 16 of
|
Thanks @jeffbonhag, that works for |
Another [really gross] workaround is to just monkey-patch the HTTP gem: # Monkey-patch HTTP::URI
class HTTP::URI
def port
443 if self.https?
end
end |
👍 @jeffbonhag Worked for me too in |
Cannot believe this is still open, I just ran into it. Edit: The fix from @jeffbonhag seems to be working, but I don't really like monkey-patching. |
Yeah this is kind of a serious bug to still be present. I'd like to think that a patch, even the above workaround, could be implemented as a bug fix in the meantime. |
This commit fixes it, but I don't believe it's been merged? https://github.com/animeavi/twitter/commit/6d08c5932d3033d5b69537730e02ac5905775410 |
Sorry it took so long to fix this. I’m planning to push a new release including this fix tomorrow. |
The HTTP (gem) dependency has changed from ~> 0.6.0 for v5.14.0 to ~> 0.8.3 for v6.0.0.
There's been a change to how the HTTP gem creates request object URIs. The former uses
<URI>
while the latter uses<HTTP::URI>
which is a subclass of<Addressable::URI>
:0.6.x
0.8.x
The 0.8.x
HTTP::URI.parse
method does not set the port based on the uri scheme:0.6.x
0.8.x
As a result, when creating a
Twitter::Streaming::Connection
with 0.8.x, the TCPSocket is passednil
for the port argument.This results in either a failed connection on OS X or a connection timeout on Linux.
OS X 10.10.4
Ubuntu 14.04
The text was updated successfully, but these errors were encountered: