At 23:51 19.03.01 +0900, Matt Armstrong wrote: >On Mon, Mar 19, 2001 at 11:11:22PM +0900, Tammo Freese wrote: >> >> Socket.getservbyname seems not to find http. >> >> $ ruby -ve 'require "socket"; puts Socket.getservbyname("http")' >> ruby 1.6.3 (2001-03-19) [i686-cygwin] >> -e:1:in `getservbyname': no such servce http/tcp (SocketError) >> from -e:1 >> >> It works at least with finger, telnet and ftp. > >Ruby just calls your system's getservbyname() function, which in this >case is cygwin's getservbyname(). So the problem is probably with >cygwin and not ruby. > >But! This URL http://www.cygwin.com/ml/cygwin/2000-11/msg01177.html >says that cygwin's getservbyname() is just a mapping to the Win32 >getservbyname(). So the bug is probably with windows itself. Dave, Matt, thank you both for your fast answers. It was the missing entry in system32\drivers\etc\Services. I don't know whether it is a bug or a feature, but adding http 80/tcp to Services is a workaround. Thanks again, - Tammo Freese freese / acm.org