Index: [Article Count Order] [Thread]

Date: Mon, 09 Feb 2004 13:07:37 +0900
From: "Kawaji, Shinya" <kawaji@hoppeta.com>
Subject: [webrickja:112] Re: [PATCH] Use the BasicSocket#do_not_reverse_lookup flag in Webrick
To: ruby-core@ruby-lang.org
Cc: webrickja@notwork.org
Message-Id: <20040209130737!B$Bvg@hoppeta.com>
In-Reply-To: <20040207104517.48334777@localhost>
References: <20040207104517.48334777@localhost>
X-Mail-Count: 00112

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