From: Thomas Uehlinger Date: 2004-02-09T16:33:05+09:00 Subject: Re: [PATCH] Use the BasicSocket#do_not_reverse_lookup flag in Webrick Hi, On Mon, 9 Feb 2004 16:04:49 +0900 "Kawaji, Shinya" wrote: > I also submitted this pacth. > > (Sorry but in Japanese.) > http://www.notwork.org/ipr/webrick/webrickja/100/105.html > > So I'm not the only one... ;-) > However, I think that applying is difficult for it since this method > (BasicSocket.do_not_reverse_lookup) influences the whole webrick server. > http://www.rubycentral.com/book/lib_network.html#BasicSocket.do_not_reverse_lookup > That's not true anymore (from Ruby 1.9 changelog): Fri Feb 6 10:12:06 2004 Nobuyoshi Nakada * ext/socket/socket.c (bsock_do_not_reverse_lookup): control reverse lookup for every instance. [ruby-core:02346] So now you can do: sock = IPSocket.new(...) sock.do_not_reverse_lookup= true / false So maybe you can change your patch too and then they will accept this patch. -- Thomas Uehlinger > I think that it is necessary whether IPSocket#peeraddr can receive > "do not reverse lookup flag" or not. > > for example, > > IPSocket#peeraddr() > reverse lookup owing to BasicSocket.do_not_reverse_lookup. > > IPSocket#peeraddr(false) > reverse lookup always. > > IPSocket#peeraddr(true) > DO NOT reverse lookup always. > > > Or it should stop using IPSocket#peeraddr and ruby's Resolv library > should be used for reverse lookup. > > -- > Shinya Kawaji > >