LUA-URI-FTP(3) | Lua uri.ftp module | LUA-URI-FTP(3) |
lua-uri-ftp - FTP URI support for Lua URI library
The class "uri.ftp" is used for URIs with the "ftp" scheme. It inherits from the uri._login class.
FTP URIs with a missing authority part or an empty host part are considered to be invalid. An empty path is always normalized to '/'. The default port is 21.
All the methods defined in lua-uri(3) and lua-uri-_login(3) are supported, in addition to the following:
local uri = assert(URI:new("ftp://host/path")) uri:ftp_typecode("a") -- ftp://host/path;type=a uri:ftp_typecode(nil) -- ftp://host/path
Passing in an empty string has the same effect as nil, removing the parameter. An empty type parameter will be returned as nil, the same as if the parameter was missing.
This class is based on "RFC 1738 section 3.2". Unfortunately there isn't currently an RFC for FTP URIs based on the more up to date "RFC 3986".
2012-00-00 | 1.1 |