aboutsummaryrefslogtreecommitdiff
path: root/src/mime.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-11-28 02:36:07 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-11-28 02:36:07 +0000
commit297b32e828b76ee544c9d4f89f996eda78830cc0 (patch)
tree312ca3a296b1e959acddeca9303cb238ac8324dc /src/mime.lua
parent05e8f243851049cebda6c5b690d3cde0f1e2c874 (diff)
downloadluasocket-297b32e828b76ee544c9d4f89f996eda78830cc0.tar.gz
luasocket-297b32e828b76ee544c9d4f89f996eda78830cc0.tar.bz2
luasocket-297b32e828b76ee544c9d4f89f996eda78830cc0.zip
LTN12 bug removed.
Diffstat (limited to 'src/mime.lua')
-rw-r--r--src/mime.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mime.lua b/src/mime.lua
index 712600c..42d0b3c 100644
--- a/src/mime.lua
+++ b/src/mime.lua
@@ -49,6 +49,15 @@ mime.decodet['quoted-printable'] = function()
49 return ltn12.filter.cycle(unqp, "") 49 return ltn12.filter.cycle(unqp, "")
50end 50end
51 51
52local io, string = io, string
53
54local function format(chunk)
55 if chunk then
56 if chunk == "" then return "''"
57 else return string.len(chunk) end
58 else return "nil" end
59end
60
52-- define the line-wrap filters 61-- define the line-wrap filters
53mime.wrapt['text'] = function(length) 62mime.wrapt['text'] = function(length)
54 length = length or 76 63 length = length or 76