Commit Graph

13 Commits

Author SHA1 Message Date
Jon Zeppieri
03237c06f2 Moved `net/ftp' code from unit to module. 2011-09-05 15:22:38 -04:00
Eli Barzilay
cc69dfbd71 Typo in error message. 2011-08-17 10:00:55 -04:00
Matthew Flatt
1c1d1934f4 ftp: fix data download for some servers 2011-08-10 08:28:13 -06:00
Eli Barzilay
5a7ddd6611 Add an optional path argument to `ftp-directory-list'. 2011-08-05 01:14:16 -04:00
Eli Barzilay
6a1336e75e Return a file size string when possible.
This takes the advice from
  http://files.stairways.com/other/ftp-list-specs-info.txt
further: search for the date by an explicit occurrence of a known month
name.  This means that we won't see files with bad names (they'd be
filtered out of the result), but the filtered out entries are ones that
would not be usable with `ftp-make-file-seconds'.

When the month is found, and the entry is a file, look for a number
preceding the month, and if found, return it as the file size string.
This is a minor change in the API.  (But it's probably better to either
revise it further, or eventually make it irrelevant by exposing the
interesting functionality via `net/url'.)
2011-08-05 01:14:16 -04:00
Eli Barzilay
4daaa84636 Removed a bunch of bytes->strings conversions since output does that anyway.
Also got rid of `filter-tcp-data', and just use `port->lines' instead.
2011-08-05 01:14:16 -04:00
Eli Barzilay
234015b34d Make `ftp-make-file-seconds' use a correct year instead of 2002.
This function was using 2002 when there's no year...  Updated it to use
the last occurrence of the guessed date, as described at
  http://files.stairways.com/other/ftp-list-specs-info.txt

This function still looks pretty bogus -- the RFC does *not* say
anything about the format of response to `LIST', so it's whatever
semi-random thing the server does.  (The above link looks like an
attempt to fix it, but I didn't see anything more official than that.)
From some looking around, it looks like ftp clients just try a bunch of
patterns against the text.  Add also warnings in the documentation about
this.
2011-08-05 01:14:16 -04:00
Eli Barzilay
ba48669ead Use UTF-8 and CRLF in the ftp client
RFC 2640 specifies that all transport strings are assumed UTF-8 if they
can be parsed as such.  To make this complete it should really send a
FEAT and check that the result has "UTF8", but it's kind of redundant
since there's not much else to do if it isn't.

Also, switch to a more correct line endings of CRLF when sending
messages to the server.
2011-08-05 01:14:16 -04:00
Stephen Chang
c52b70244d add 125 to list of expected return codes when receiving data in net/ftp 2011-02-08 13:17:14 -05:00
David Van Horn
760a58b65d Fixes more spelling errors. 2011-02-04 19:44:13 -07:00
Jay McCarthy
f5bddf7705 Fixing ftp-download-file 2010-05-24 09:56:35 -06:00
Jay McCarthy
63df5311c5 Racketizing 2010-05-24 09:56:34 -06:00
Matthew Flatt
28b4043077 rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00