[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Localhost variability

gruby

9/11/2003 6:55:00 PM

@host = "127.0.0.1"
@port = "8080"
@server = TCPserver.new(@host, @port)
loop do
Thread.start(@server.accept) do |con|
hostname = con.addr[2]
puts hostname
end
end

On my box (OS X 10.2.6, ruby 1.8), hostname is 'localhost'.

On my developer's box (FreeBSD 4.8 stable, ruby 1.8), hostname is
'localhost.subdomain.domain'.

I think my box is correct. Is this a bug?
1 Answer

gabriele renzi

9/11/2003 10:08:00 PM

0

il 11 Sep 2003 11:54:58 -0700, gruby@sysarchitects.com (John) ha
scritto::


>On my box (OS X 10.2.6, ruby 1.8), hostname is ''localhost''.
>
>On my developer''s box (FreeBSD 4.8 stable, ruby 1.8), hostname is
>''localhost.subdomain.domain''.
>
>I think my box is correct. Is this a bug?

IMO
it depends from /etc/hosts and the OS name resolution , not from ruby