diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-11-28 02:36:07 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-11-28 02:36:07 +0000 |
commit | 297b32e828b76ee544c9d4f89f996eda78830cc0 (patch) | |
tree | 312ca3a296b1e959acddeca9303cb238ac8324dc /src/mime.lua | |
parent | 05e8f243851049cebda6c5b690d3cde0f1e2c874 (diff) | |
download | luasocket-297b32e828b76ee544c9d4f89f996eda78830cc0.tar.gz luasocket-297b32e828b76ee544c9d4f89f996eda78830cc0.tar.bz2 luasocket-297b32e828b76ee544c9d4f89f996eda78830cc0.zip |
LTN12 bug removed.
Diffstat (limited to 'src/mime.lua')
-rw-r--r-- | src/mime.lua | 9 |
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, "") |
50 | end | 50 | end |
51 | 51 | ||
52 | local io, string = io, string | ||
53 | |||
54 | local function format(chunk) | ||
55 | if chunk then | ||
56 | if chunk == "" then return "''" | ||
57 | else return string.len(chunk) end | ||
58 | else return "nil" end | ||
59 | end | ||
60 | |||
52 | -- define the line-wrap filters | 61 | -- define the line-wrap filters |
53 | mime.wrapt['text'] = function(length) | 62 | mime.wrapt['text'] = function(length) |
54 | length = length or 76 | 63 | length = length or 76 |