[Haskell-cafe] upload file with ftp

Brandon Allbery allbery.b at gmail.com
Tue Jan 5 19:14:06 UTC 2021

In normal mode the server opens a connection to the FTP client; in PASV
mode the client instead opens a connection to the server, so it'll work
through a firewall.

On Tue, Jan 5, 2021 at 2:09 PM Joachim Durchholz <jo at durchholz.org> wrote:

> Am 05.01.21 um 16:54 schrieb Kees Bleijenberg:
> > Unfortunately is ‘working in passive mode’ not so easy (at least not to
> > me). After login I send the ‘pasv’ command and I get back a IP address
> > and a port (I assume). Do I have to create a new connection with a
> > handle to this new port for the stor command?
> Yes.
>  >  I don’t know how to do that in network.ftp.client.
> If network.ftp.client does not support that out of the box, you'll
> either have to find another library or add PASV support to it.
> My knowledge of the FTP protocol is pretty rusty, but I believe you the
> model after PASV is that you continue using normal commands but the data
> transfers happen over the other connection.
> I'd watch out for how the protocol marks the beginning and end of a data
> stream (it's not a single connection anymore so you lose the sequencing
> guarantees of TCP packets; I'd assume they either send a special packet
> on the data connection, or they transmit the file sizes via the normal
> channel).
> However, I can't avoid wondering why anybody would want to use the FTP
> protocol at all. It's so unsafe, so bottleneck-endangered, the only
> reason to do that would be interfacing with existing FTP servers, and
> even these are being phased out in favor of HTTPS, with POST for uploads.
> (I'm not questioning the validity of your use case, just wondering how
> such a use case can come up in today's world.)
> Regards,
> Jo
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.

brandon s allbery kf8nh
allbery.b at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20210105/c2fcebcf/attachment.html>

More information about the Haskell-Cafe mailing list