On Tue, Aug 16, 2011 at 1:18 PM, Petite Abeille
<petite.abeille@gmail.com> wrote:
On Aug 13, 2011, at 7:30 PM, Gaspard Bucher wrote:
> I finally managed to have a basic WebDAV server working.
>
> Simple example: https://github.com/lubyk/lubyk/blob/master/modules/lk/examples/webdav.lua
Nice :)
FWIW, here is another, very basic WebDAV implementation, courtesy of Nanoki:
http://svr225.stepx.com:3388/
One should be able to connect to the above URL with a WebDAV client (e.g. Mac OS X Finder, Windows Explorer, etc).
Gritty implementation details:
http://dev.alt.textdrive.com/browser/HTTP/WikiDAV.lua
http://dev.alt.textdrive.com/browser/HTTP/WikiDAV.txt
Hi Petite Abeille !
In fact, I first downloaded the code from Nanoki to see if I could use it instead of building my own stuff but I had some difficulties understanding all the dependencies and didn't want to end up with many socket/http implementations in Lubyk.
Reading the code for the webdav server in Nanoki was very helpful.
As a side note, I have just written a new lk.Socket implementation that I am now using instead of LuaSocket (so that I can release the gil in Lubyk while receiving or accepting allowing me to implement multiple server/clients in a single Lua state). The code is just a header [1] and two C++ files [2] so it should be easy for anyone to adapt/extend/transform. The lk.Socket also supports directly sending Lua values (encoded with msgpack):
client:sendMsg(123, {_one_ = 45})
local nb, tbl = server:recvMsg()
-- nb = 123
-- tbl = {_one_ = 45}
I was very happy with LuaSocket and it has obviously been written by smarter people then me but I could not make it "gil" aware without changing many things (rewriting buffer, changing tcp, io, socket).
Cheers !
Gaspard