We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey,
I think I've found an issue introduced with the change in #10.
Changing from TCPSocket.open to Socket.tcp seems to break the functionality of resolv-replace.
TCPSocket.open
Socket.tcp
Not sure if this was a by design change and if not if the right place for a fix is here or in resolv-replace itself.
Thanks
A test demonstrating the issue:
gem 'net-http', '0.2.0' # Fails # gem 'net-http', '0.1.0' # Works require 'net/http' require 'resolv-replace' fake_host = 'not.a.host' hosts_file_name = 'hosts_file' hosts_file = "#{Resolv.getaddress('google.com')} #{fake_host}" File.write(hosts_file_name, hosts_file) hosts_resolver = Resolv::Hosts.new(hosts_file_name) dns_resolver = Resolv::DNS.new Resolv::DefaultResolver.replace_resolvers([hosts_resolver, dns_resolver]) puts Net::HTTP.get(URI("http://#{fake_host}"))
The text was updated successfully, but these errors were encountered:
That sounds more like resolv-replace that should be updated to also patch Scoket.tcp https://github.com/ruby/resolv-replace/blob/master/lib/resolv-replace.rb
resolv-replace
Scoket.tcp
Sorry, something went wrong.
No branches or pull requests
Hey,
I think I've found an issue introduced with the change in #10.
Changing from
TCPSocket.open
toSocket.tcp
seems to break the functionality of resolv-replace.Not sure if this was a by design change and if not if the right place for a fix is here or in resolv-replace itself.
Thanks
A test demonstrating the issue:
The text was updated successfully, but these errors were encountered: