Open johnwcowan opened 2 years ago
This is not a requirement, but because an FTP connection can support multiple requests sequentially, it would be efficient to keep a connection open and close it on a timeout if no further requests have been made for a while. Connections shouldn't be shared between tabs.
This is certainly something to consider, however I'm not immediately convinced that FTP support belongs in Lagrange. One reason is that FTP is (relatively speaking) significantly more complex than the currently supported protocols. Another reason is that FTP wouldn't anyway be implemented fully, so a full-fledged FTP client will always be a better choice. Lagrange is also Gemini-focused, while FTP belongs more in the era of Gopher and Finger. While supporting the classic protocols is nice for the Smol Internet, I wouldn't prioritize them over Gemini-focused features.
On the other hand, viewing directory listings and being able to download files via FTP URLs would be quite convenient.
The trouble with graphical FTP clients is that they aren't browsers; they are designed to copy files between the local system and the remote one. So if you are looking at an FTP tree, you don't get a full-screen view of the file you are currently seeing. You can generally launch an editor, but that's not the same look and feel at all.
If I get a chance I'll try to write the code for this, as I did for Finger.
A patch implementing this would be quite welcome.
Browsers are getting worse and worse at FTP support, and I wouldn't be surprised if they eventually drop it altogether. But FTP naturally belongs to the Smol Internet, and as such I think it would make a lot of sense for Lagrange to support it.
RFC 959 is the official FTP RFC, but it contains way more detail than is needed to support browsing. This gist provides what a browser implementer needs to know to access almost all FTP servers.