-
-
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
stream client proxy not working #981
Comments
an older version of the gem (5.15.0 + http.rb 0.9.9) seems to be working, proxy log:
the only difference seems to be |
🥗 confirmed, patching HTTP to send full URIs via proxy seems to resolve the issue: ::HTTP::Request.class_eval do
def headline
request_uri =
if using_proxy? #&& !uri.https?
uri.omit(:fragment)
else
uri.request_uri
end
"#{verb.to_s.upcase} #{request_uri} HTTP/#{version}"
end
end ... the patch essentially undoes: httprb/http#333 (which has been shipped since http.rb 2.0.0) |
to recap, this is a (squid) proxy issue (httprb/http#333 seems legit), |
Working through a proxy, I get an error: cannot interpret as DNS name: nil (gem 'twitter' 7.0.0).
[ActiveJob] [RetweetsJob] [d564b4c5-6f04-4191-bd69-bba02a4965e0] Error performing RetweetsJob (Job ID: d564b4c5-6f04-4191-bd69-bba02a4965e0) from Async(default) in 15.55ms: ArgumentError (cannot interpret as DNS name: nil) Any ideas? Thank you. |
I've tried setting up a proxy with the streaming client and it does not work, sample script:
Have tested this setup using twitter gem 6.2.0 as well as latest (7.0.0) on MRI 2.5.7 and JRuby 9.2.
Believe the problem might be with the http gem, potentially not handling the proxy setup for streaming connection?
I was able to verify the proxy isn't an issue, I've tried Python's (tweepy) client with a similar setup using a proxy.
The proxy is a standard Squid installation on ubuntu, listening on its default 3128 port.
The Ruby client seems to be trying a
POST
request for streaming which gets rejected:While the Python client simply issues a
CONNECT
:Also the proxy settings are bit confusing as they're different based on the client being used.
Which is a shame considering most of the configuration is the same for both the rest and streaming client:
The text was updated successfully, but these errors were encountered: