[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: luasocket/soap: can I keep the connection open?
- From: Petite Abeille <petite.abeille@...>
- Date: Sun, 3 Oct 2010 20:38:12 +0200
On Oct 3, 2010, at 8:26 PM, Norbert Kiesel wrote:
> 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.
The thing is... LuaSocket http module doesn't support persistent connection by default... so you will have to tweak it a bit...
Now... from an HTTP point of view... you need the client side request to be HTTP/1.1 or use connection = keep-alive for earlier version.
And have the HTTP server honor such persistent request... which the server could choose not to.
The easiest way to check what's going on would be to record what HTTP request header are emitted and what response header are returned.