lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, 2010-10-03 at 20:09 +0200, Petite Abeille wrote:
> On Oct 3, 2010, at 8:04 PM, Norbert Kiesel wrote:
> 
> >> At first glance, luasocket's http module doesn't support persistent connection.
> >> 
> >> http.lua:215 adjustheaders(reqt): ["connection"] = "close, TE",
> >> http.lua:327 trequest(reqt): h:close()
> > 
> > Yeah, but even after commenting out the h:close() the socket is  still
> > closed somehow.
> 
> By default, the request is asking for the connection to be closed by the server (http.lua:215), so perhaps this is not unexpected, no?

First of all thanks for your help.
I removed the "close" from that line (and also the TE in another
attempt), but that does not make a difference.  I even ran it under gdb
and put breakpoints on meth_close and meth_shutdown (the C functions
implementing socket:close() and socket:shutdown(), but they are not hit
and still getfd() returns -1 after the request.

</nk>