diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-05-28 07:24:43 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-05-28 07:24:43 +0000 |
commit | c98dc991998c724a3f6a1fdd90b5d1d8a80e3af3 (patch) | |
tree | 8d8b8aa856d8a3e822121d0915a63b8244f471bb /etc | |
parent | 9297b074d53a00e1149250e0bbfa0871dcc5558f (diff) | |
download | luasocket-c98dc991998c724a3f6a1fdd90b5d1d8a80e3af3.tar.gz luasocket-c98dc991998c724a3f6a1fdd90b5d1d8a80e3af3.tar.bz2 luasocket-c98dc991998c724a3f6a1fdd90b5d1d8a80e3af3.zip |
Bug feioso no UDP e possivelmente no TCP também.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/b64.lua | 4 | ||||
-rw-r--r-- | etc/check-links.lua | 4 | ||||
-rw-r--r-- | etc/dict.lua | 4 | ||||
-rw-r--r-- | etc/qp.lua | 4 |
4 files changed, 12 insertions, 4 deletions
diff --git a/etc/b64.lua b/etc/b64.lua index 1993b01..b86b870 100644 --- a/etc/b64.lua +++ b/etc/b64.lua | |||
@@ -10,5 +10,5 @@ else | |||
10 | local wrap = mime.wrap() | 10 | local wrap = mime.wrap() |
11 | convert = ltn12.filter.chain(base64, wrap) | 11 | convert = ltn12.filter.chain(base64, wrap) |
12 | end | 12 | end |
13 | source = ltn12.source.chain(source, convert) | 13 | sink = ltn12.sink.chain(convert, sink) |
14 | repeat until not ltn12.pump(source, sink) | 14 | ltn12.pump.all(source, sink) |
diff --git a/etc/check-links.lua b/etc/check-links.lua index 03ca6de..c200dfb 100644 --- a/etc/check-links.lua +++ b/etc/check-links.lua | |||
@@ -4,6 +4,10 @@ | |||
4 | -- Author: Diego Nehab | 4 | -- Author: Diego Nehab |
5 | -- RCS ID: $Id$ | 5 | -- RCS ID: $Id$ |
6 | ----------------------------------------------------------------------------- | 6 | ----------------------------------------------------------------------------- |
7 | |||
8 | require"luasocket" | ||
9 | require"http" | ||
10 | |||
7 | socket.http.TIMEOUT = 10 | 11 | socket.http.TIMEOUT = 10 |
8 | 12 | ||
9 | cache = {} | 13 | cache = {} |
diff --git a/etc/dict.lua b/etc/dict.lua index d11ac93..31359d9 100644 --- a/etc/dict.lua +++ b/etc/dict.lua | |||
@@ -4,6 +4,8 @@ | |||
4 | -- Author: Diego Nehab | 4 | -- Author: Diego Nehab |
5 | -- RCS ID: $Id$ | 5 | -- RCS ID: $Id$ |
6 | ----------------------------------------------------------------------------- | 6 | ----------------------------------------------------------------------------- |
7 | require"luasocket" | ||
8 | |||
7 | function get_status(sock, valid) | 9 | function get_status(sock, valid) |
8 | local line, err = sock:receive() | 10 | local line, err = sock:receive() |
9 | local code, par | 11 | local code, par |
@@ -12,7 +14,7 @@ function get_status(sock, valid) | |||
12 | code = tonumber(code) | 14 | code = tonumber(code) |
13 | if code ~= valid then return code end | 15 | if code ~= valid then return code end |
14 | if code == 150 then | 16 | if code == 150 then |
15 | par = tonumber(socket.skip(2, string.find(line, "^%d%d%d (%d*)")) | 17 | par = tonumber(socket.skip(2, string.find(line, "^%d%d%d (%d*)"))) |
16 | end | 18 | end |
17 | return nil, par | 19 | return nil, par |
18 | end | 20 | end |
@@ -1,3 +1,5 @@ | |||
1 | require("ltn12") | ||
2 | require("mime") | ||
1 | local convert | 3 | local convert |
2 | arg = arg or {} | 4 | arg = arg or {} |
3 | local mode = arg and arg[1] or "-et" | 5 | local mode = arg and arg[1] or "-et" |
@@ -13,4 +15,4 @@ elseif mode == "-eb" then | |||
13 | else convert = mime.decode("quoted-printable") end | 15 | else convert = mime.decode("quoted-printable") end |
14 | local source = ltn12.source.chain(ltn12.source.file(io.stdin), convert) | 16 | local source = ltn12.source.chain(ltn12.source.file(io.stdin), convert) |
15 | local sink = ltn12.sink.file(io.stdout) | 17 | local sink = ltn12.sink.file(io.stdout) |
16 | ltn12.pump(source, sink) | 18 | ltn12.pump.all(source, sink) |