mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-01-30 00:22:50 +01:00
moteus
00a06857c9
Fix. recive 2xx while ftp.get cause timeout error
In this example: >Client send: MDTM test.txt >Server response: 213 20120824120909 Because FTP server do not open new channel (2XX response) and LuaSocket try open new channel we get timeout. ```lua local ftp = require "socket.ftp" local ltn12 = require "ltn12" local url = require("socket.url") local URL = "ftp://USER:TEST@127.0.0.1"; local CMD = 'MDTM test.txt'; -- get timeout ftp.get{ url = URL; command = CMD; sink = ltn12.sink.table{}; } -- or we can use ftp.command ftp.command{ url = URL; command = URL, check = function(...) local status, data = ... return true end; } ```
This is the LuaSocket 2.1. It has been tested on --[[WinXP--]], Mac OS X, and --[[Linux--]]. Please use the Lua mailing list to report any bugs (or "features") you encounter. Have fun, Diego Nehab.
Languages
HTML
48.5%
C
27.1%
Lua
22.7%
Makefile
1.4%