Localhost variability

J

John

@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?
 
G

gabriele renzi

il 11 Sep 2003 11:54:58 -0700, (e-mail address removed) (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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,125
Messages
2,570,748
Members
47,302
Latest member
MitziWragg

Latest Threads

Top