Manual is almost done. HTTP is missing.

Implemented new distribution scheme.
Select is now purely C.
HTTP reimplemented seems faster dunno why.
LTN12 functions that coroutines fail gracefully.
This commit is contained in:
Diego Nehab
2004-06-15 06:24:00 +00:00
parent 9ed7f955e5
commit 58096449c6
40 changed files with 2035 additions and 815 deletions

View File

@ -5,24 +5,16 @@
-- RCS ID: $Id$
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- Load MIME from dynamic library
-- Comment these lines if you are loading static
-----------------------------------------------------------------------------
local open = assert(loadlib("mime", "luaopen_mime"))
local mime = assert(open())
-----------------------------------------------------------------------------
-- Load other required modules
-----------------------------------------------------------------------------
local mime = requirelib("mime", "luaopen_mime", getfenv(1))
local ltn12 = require("ltn12")
-----------------------------------------------------------------------------
-- Setup namespace
-----------------------------------------------------------------------------
-- make all module globals fall into mime namespace
setmetatable(mime, { __index = _G })
setfenv(1, mime)
_LOADED["mime"] = mime
-- encode, decode and wrap algorithm tables
encodet = {}
@ -48,7 +40,7 @@ end
encodet['quoted-printable'] = function(mode)
return ltn12.filter.cycle(qp, "",
(mode == "binary") and "=0D=0A" or "\13\10")
(mode == "binary") and "=0D=0A" or "\r\n")
end
-- define the decoding filters