[#2367] Standard libraries — Dave Thomas <dave@...>

From ruby-dev summary:

60 messages 2004/02/11

[#2397] PATCH: deprecate cgi-lib, getopts, importenv, parsearg from standard library — Gavin Sinclair <gsinclair@...>

Index: cgi-lib.rb

15 messages 2004/02/12

[#2465] PATCH: OpenStruct#initialize to yield self — Gavin Sinclair <gsinclair@...>

This is a common approach I use to object initialization; I don't know

24 messages 2004/02/19

Re: [PATCH] Use the BasicSocket#do_not_reverse_lookup flag in Webrick

From: "Kawaji, Shinya" <kawaji@...>
Date: 2004-02-09 07:04:49 UTC
List: ruby-core #2360
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


In This Thread