Hi,
Thomas Uehlinger <uehli@bluewin.ch> wrote:
> With this patch you can make use of the new per-socket
> do_not_reverse_lookup flag in Webrick.
> I wonder if it would make sense to even set :DoNotReverseLookup to
> true as the standard configuration because reverse lookup just slows
> down the server in normal operation.
I also submitted this pacth.
(Sorry but in Japanese.)
http://www.notwork.org/ipr/webrick/webrickja/100/105.html
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
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