aboutsummaryrefslogtreecommitdiffstats
path: root/lib/resolv.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* * lib/resolv.rb (Resolv::DNS::Label::Str#initialize): Set encodingakr2014-12-311-1/+3
| | | | | | | | | ASCII-8BIT before downcase. case insensivity of DNS labels doesn't apply non-ASCII characters. [RFC 4343] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Name#==): Compare an array of Label:Strakr2014-12-311-1/+1
| | | | | | | | objects. Label#Str#== is case-insensitive. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* resolv.rb: case-insensitive comparisonnobu2014-12-301-2/+2
| | | | | | | | * lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the comparison should be case-insensitive as well. [ruby-core:66498] [Bug #10550] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* resolv.rb: dots differencesnobu2014-12-301-1/+2
| | | | | | | * lib/resolv.rb (Resolv::DNS::Name): names with different dots should be different. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: fall back if canonicalization fails.tenderlove2014-11-211-0/+4
| | | | | | | | Thanks Vit Ondruch for the patch! [ruby-core:65836] * test/resolv/test_dns.rb: test for patch git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* normalize reference to Timeout::Errornormal2014-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | From: John Bachir <j@jjb.cc> * bootstraptest/test_io.rb (assert_finish): normalize rescue for Timeout::Error * lib/net/ftp.rb (Net#read_timeout): ditto for doc * lib/resolv.rb (Resolv::ResolvTimeout): ditto for subclass * lib/webrick/httprequest.rb (_read_data): ditto for rescue * sample/timeout.rb (p timeout): ditto for call * test/drb/drbtest.rb (test_06_timeout): ditto * test/ruby/test_readpartial.rb (test_open_pipe): ditto * test/thread/test_queue.rb (test_queue_thread_raise): ditto * thread.c (rb_thread_s_handle_interrupt): ditto for doc [ruby-core:65481] [misc #10339] TimeoutError is a legacy constant, Timeout::Error is the canonical constant. This patch normalizes all code and comments to reference Timeout::Error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/gserver.rb: remove redundant use of to_s in interpolation.hsbt2014-06-241-7/+7
| | | | | | | | | | * lib/logger.rb: ditto. * lib/optparse.rb: ditto. * lib/rbconfig/obsolete.rb: ditto. * lib/resolv.rb: ditto. * lib/webrick/httpresponse.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (bind_random_port): Rescue EPERM for FreeBSD whichakr2014-02-221-1/+3
| | | | | | | | | | security.mac.portacl.port_high is changed. See mac_portacl(4) for details. Reported by Jakub Szafranski. [ruby-core:60917] [Bug #9544] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder#get_labels):akr2014-02-081-8/+11
| | | | | | | Make it iterative. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: Don't set CLOEXEC flag explicitly. (Ruby set it byakr2014-02-081-4/+0
| | | | | | | | default.) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder): Raiseakr2014-02-081-0/+3
| | | | | | | | DecodeError if no data before the limit. Reported by Will Bryant. [ruby-core:60557] [Bug #9498] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: Ignore name servers which cause EAFNOSUPPORT onakr2014-02-071-4/+12
| | | | | | | | | socket creation. Reported by Bjoern Rennhak. [ruby-core:60442] [Bug #9477] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Resource::TXT#data): Return concatenatedakr2014-01-181-2/+2
| | | | | | | | | string. Patch by Ryan Brunner. [ruby-core:58220] [Bug #9093] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* resolv.rb: no encodingsnobu2013-12-211-2/+2
| | | | | | | | * lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not consider encodings in hosts file. [ruby-core:59239] [Bug #9273] * lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: Fix typo in an error messagea_matsuda2013-12-121-1/+1
| | | | | | s/postive/positive/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* resolv.rb: workaround for recent Rubygemsnobu2013-10-181-0/+1
| | | | | | | * lib/resolv.rb (Resolv::Hosts): get rid of load error in require which causes recent Rubygems to build all extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi.rb: [DOC] Capitalize "Ruby" in documentation [Fixes GH-341]zzak2013-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | Patch by Dave Worth https://github.com/ruby/ruby/pull/341 * lib/webrick.rb: ditto * lib/scanf.rb: ditto * lib/xmlrpc/config.rb: ditto * lib/resolv.rb: ditto * lib/e2mmap.rb: ditto * lib/fileutils.rb: ditto * lib/mkmf.rb: ditto * lib/cgi/session.rb: ditto * lib/yaml.rb: ditto * lib/erb.rb: ditto * lib/irb.rb: ditto * lib/tracer.rb: ditto * lib/net/http.rb: ditto * ext/syslog/lib/syslog/logger.rb: ditto * sample/pty/expect_sample.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (MDNSOneShot#sender): Delete an unused variable.akr2013-04-071-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: Support LOC resources.akr2013-04-061-1/+309
| | | | | | | [ruby-core:23361] [Feature #1436] by JB Smith. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: Add one-shot multicast DNS support.akr2013-04-061-2/+112
| | | | | | | | [ruby-core:53387] [Feature #8089] by Eric Hodel. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS.fetch_resource): New method to obtainakr2013-04-061-1/+7
| | | | | | | | | full result. [ruby-dev:43587] [Feature #4788] proposed by Makoto Kishimoto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (bind_random_port): Rescue EACCES for SunOS.akr2013-04-041-1/+1
| | | | | | | | | | bind() on SunOS for port 2049 (nfs) and 4045 (lockd) causes EACCES with unprivileged process. cf. PRIV_SYS_NFS in privileges(5) [ruby-core:48064] [Bug #7183] reported by Frank Meier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: Test Windows platform by detecting LoadError whenakr2013-03-281-2/+2
| | | | | | | | | require 'win32/resolv' suggested by Nobuyoshi Nakada [ruby-core:53389]. [ruby-core:53388] [Feature #8090] Reported by Charles Nutter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS): retry IO.select for premature wakeup.akr2011-10-311-3/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: fix a exception name in previous patch.akr2011-10-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: make timeout configurable for DNS query.akr2011-10-221-1/+30
| | | | | | | patch by Eric Wong. [ruby-core:38533] [Feature #5100] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: Hide private method and state-tracking constants fromdrbrain2011-05-131-3/+3
| | | | | | | RDoc. Patch by Mark Turner. [Ruby 1.9 - Feature #4691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * resolv.rb (Resolv::DNS): use the same DNS server when retry using TCP.akr2010-11-271-4/+3
| | | | | | | reported by Julian Mehnle. [ruby-core:32970] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: retry via TCP if UDP reply is truncated.akr2010-10-291-3/+20
| | | | | | | fixed by Julian Mehnle. [ruby-core:32407] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Requester#request): rescue ECONNRESETakr2010-05-311-1/+2
| | | | | | | for Windows. reported by U.Nakamura. [ruby-dev:41477] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Requester#request): rescue ECONNREFUSED.akr2010-05-291-1/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::IPv4::Regex): make it only accept 0 to 255.akr2010-04-181-1/+5
| | | | | | | [ruby-core:29501] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: fix [ruby-core:28320] reported by Paul Clegg.akr2010-02-241-1/+5
| | | | | | | | (Resolv::DNS::Requester#request): raise ResolvTimeout consistently for timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: fix [ruby-core:28144].akr2010-02-111-33/+59
| | | | | | | | | | | | | | | | | | | | | | | | | (Resolv::DNS#make_requester): pass nameserver_port to UnconnectedUDP.new. (Resolv::DNS.bind_random_port): change the is_ipv6 argument to bind_host. (Resolv::DNS::Requester#initialize): change instance variable to store multiple sockets. (Resolv::DNS::Requester#request): pass readable sockets to recv_reply. (Resolv::DNS::Requester#close): close all sockets. (Resolv::DNS::Requester::UnconnectedUDP#initialize): allocate a socket for each address family of name servers. (Resolv::DNS::Requester::UnconnectedUDP#recv_reply): read from the passwd readable socket. (Resolv::DNS::Requester::UnconnectedUDP#sender): use appropriate socket for the target nameserver. (Resolv::DNS::Requester::ConnectedUDP): follow the instance variable change. (Resolv::DNS::Requester::TCP#sender): ditto. (Resolv::DNS::Config#nameserver_port): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::Config.default_config_hash): return annobu2010-01-191-1/+1
| | | | | | | empty hash when resolv.conf is not available. [ruby-core:27620] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Config#lazy_initialize): fixed thenobu2010-01-191-1/+1
| | | | | | | defaults of nameserver and port. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2010-01-021-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder#inspect):akr2010-01-021-2/+9
| | | | | | | implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS#initialize): new option :nameserver_port.akr2010-01-021-17/+39
| | | | | | | | | | | | | | (Resolv::DNS#each_resource): pass port number. (Resolv::DNS#make_requester): ditto. (Resolv::DNS::Config#lazy_initialize): initialize @nameserver_port instead of @nameserver. (Resolv::DNS::Config#single?): return port number addition to the nameserver. (Resolv::DNS::Config#generate_timeouts): use @nameserver_port. (Resolv::DNS::Config#resolv): yield port number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Requester::ConnectedUDP): disableakr2009-10-091-1/+3
| | | | | | | | reverse lookup. (Resolv::DNS::Requester::UnconnectedUDP): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS.bind_random_port): bind to "::" for IPv6.akr2009-10-061-4/+5
| | | | | | | | | (Resolv::DNS::ConnectedUDP#initialize): specify is_ipv6 argument of bind_random_port. [ruby-core:25970] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/xmlrpc/server.rb (Server#serve): gets rid of hardcodednobu2009-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | platform names. * lib/resolv.rb (Resolv::Hosts::DefaultFileName), (Resolv::DNS::Config.default_config_hash): tries win32/resolv on mswin64 too. * lib/rubygems/specification.rb (Gem::Specification#ruby_code): aded mswin64. * lib/drb/extservm.rb (DRb::ExtServManager#invoke_service_command): spawn is better to start a process in background. * ext/extmk.rb: uses FNM_SYSCASE. * instruby.rb: installs win32.h on mswin64 platform. [ruby-core:21722] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix rdoc.akr2009-01-311-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS#each_address): don't query IPv6 addressakr2009-01-311-1/+13
| | | | | | | if the host has no global IPv6 address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* trailing spaces removed.akr2008-09-141-20/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: randomize source port and transaction id.akr2008-08-081-118/+159
| | | | | | | | | | CVE-2008-1447. * lib/resolv-replace.rb (UDPSocket#bind): don't resolv host if host is "". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rdoc.rb: massive spelling correction patch from Evan Farrarmatz2008-06-041-2/+2
| | | | | | <evanfarrar at gmail.com> in [ruby-doc:1382] applied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::Config.default_config_hash): requiresnobu2008-03-311-0/+1
| | | | | | | win32/resolv to use Win32::Resolv. [ruby-dev:34138] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::Hosts): should not use win32/resolv on cygwin.nobu2008-03-211-1/+1
| | | | | | | | | | | | [ruby-dev:29945], [ruby-dev:34095] * lib/win32/registry.rb (Win32::Registry.expand_environ): try upcased name too for cygwin. [ruby-dev:29945] * lib/win32/resolv.rb (Win32::Resolv.get_hosts_path): use expand_path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Reolv::DNS#each_address): get A record and then AAAAnaruse2008-01-051-10/+2
| | | | | | | record. [ruby-dev:32925] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e