http.request and taking localhost

78 views
Skip to first unread message

Christian Liesch

unread,
Dec 6, 2013, 5:49:49 AM12/6/13
to lu...@googlegroups.com
Hi luvit people

I have strange behavour:
If I run the following code:

proxy_req = http.request({
  host = "localhost",
  port = 9090,
  path = "/"
})

proxy_req:done()

I get a connection refused, if I set 127.0.0.1 it is working as expected.

My /etc/hosts Entry looks somethink like that

127.0.0.1 localhost.localdomain localhost
::1 localhost

Btw. localhost.localdomain works also (as expected). But why not 127.0.0.1

I use luvit 0.7.0 (the newest I found)

Regards
Christian

Tim Caswell

unread,
Dec 6, 2013, 1:20:57 PM12/6/13
to lu...@googlegroups.com

Does it work for public domains? Or does it only work for IP addresses?

--
You received this message because you are subscribed to the Google Groups "luvit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to luvit+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Christian Liesch

unread,
Dec 7, 2013, 5:46:14 AM12/7/13
to lu...@googlegroups.com
Public Domains (like www.google.ch) works well.
Just this strange behavour of localhost with the /etc/hosts entry I posted.
Of course I can give you more details or the complete /etc/hosts if you
like (and if that helps). Also I can provide the complete code I use :)

On 12/06/2013 07:20 PM, Tim Caswell wrote:
>
> Does it work for public domains? Or does it only work for IP addresses?
>
> On Dec 6, 2013 11:49 AM, "Christian Liesch"
> <mailto:luvit%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "luvit" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/luvit/JXbLg3LGMi4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

Mauricio Henrique de Souza Bomfim

unread,
Jan 2, 2014, 8:54:03 AM1/2/14
to lu...@googlegroups.com
On Saturday, December 7, 2013 8:46:14 AM UTC-2, Christian Liesch wrote:
Public Domains (like www.google.ch) works well.
Just this strange behavour of localhost with the /etc/hosts entry I posted.
Of course I can give you more details or the complete /etc/hosts if you
like (and if that helps). Also I can provide the complete code I use :)

Hi,

I have the same problem here. Have you solved?

Thanks,

Mauricio
 

Christian Liesch

unread,
Jan 2, 2014, 1:51:23 PM1/2/14
to lu...@googlegroups.com
Hi,

No not solved. Sorry. Though it is some well know problem and hopped of
a reply of one of the developers from luvit :)
Currently play with LuaNode, which is closer to newest node.js

Regards
Christian



On 01/02/2014 02:54 PM, Mauricio Henrique de Souza Bomfim wrote:
> On Saturday, December 7, 2013 8:46:14 AM UTC-2, Christian Liesch wrote:
>
> Public Domains (like www.google.ch <http://www.google.ch>) works
> well.
> Just this strange behavour of localhost with the /etc/hosts entry
> I posted.
> Of course I can give you more details or the complete /etc/hosts
> if you
> like (and if that helps). Also I can provide the complete code I
> use :)
>
>
> Hi,
>
> I have the same problem here. Have you solved?
>
> Thanks,
>
> Mauricio
>
>
> On 12/06/2013 07:20 PM, Tim Caswell wrote:
> >
> > Does it work for public domains? Or does it only work for IP
> addresses?
> >
> > On Dec 6, 2013 11:49 AM, "Christian Liesch"
> > <christia...@gmail.com <javascript:>
> > send an email to luvit+un...@googlegroups.com <javascript:>
> > <mailto:luvit%2Bu...@googlegroups.com <javascript:>>.
> > For more options, visit
> https://groups.google.com/groups/opt_out
> <https://groups.google.com/groups/opt_out>.
> >
> > --
> > You received this message because you are subscribed to a topic
> in the
> > Google Groups "luvit" group.
> > To unsubscribe from this topic, visit
> > https://groups.google.com/d/topic/luvit/JXbLg3LGMi4/unsubscribe
> <https://groups.google.com/d/topic/luvit/JXbLg3LGMi4/unsubscribe>.
> > To unsubscribe from this group and all its topics, send an email to
> > luvit+un...@googlegroups.com <javascript:>.
> > For more options, visit https://groups.google.com/groups/opt_out
> <https://groups.google.com/groups/opt_out>.
Reply all
Reply to author
Forward
0 new messages