aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-03-17 13:03:06 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-03-17 13:03:06 +0000
commit3a7a1eba2e2b3cc05f000fc739d3548dd0a0872d (patch)
tree3861b7f148c5cab5bcaf26002d5a9ee32f46f7b9
parent1a825551083fa0b8e7ece6391a58dc417199a2e3 (diff)
downloadbusybox-w32-3a7a1eba2e2b3cc05f000fc739d3548dd0a0872d.tar.gz
busybox-w32-3a7a1eba2e2b3cc05f000fc739d3548dd0a0872d.tar.bz2
busybox-w32-3a7a1eba2e2b3cc05f000fc739d3548dd0a0872d.zip
ftpd: document NLST format
-rw-r--r--networking/ftpd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/networking/ftpd.c b/networking/ftpd.c
index 2c1d42ebf..f005d129c 100644
--- a/networking/ftpd.c
+++ b/networking/ftpd.c
@@ -692,6 +692,7 @@ handle_dir_common(int opts)
692 * are fed with ls output with bare '\n'. 692 * are fed with ls output with bare '\n'.
693 * Pity... that would be much simpler. 693 * Pity... that would be much simpler.
694 */ 694 */
695/* TODO: need to s/LF/NUL/g here */
695 xwrite_str(remote_fd, line); 696 xwrite_str(remote_fd, line);
696 xwrite(remote_fd, "\r\n", 2); 697 xwrite(remote_fd, "\r\n", 2);
697 free(line); 698 free(line);
@@ -710,6 +711,13 @@ handle_list(void)
710static void 711static void
711handle_nlst(void) 712handle_nlst(void)
712{ 713{
714 /* NLST returns list of names, "\r\n" terminated without regard
715 * to the current binary flag. Names may start with "/",
716 * then they represent full names (we don't produce such names),
717 * otherwise names are relative to current directory.
718 * Embedded "\n" are replaced by NULs. This is safe since names
719 * can never contain NUL.
720 */
713 handle_dir_common(0); 721 handle_dir_common(0);
714} 722}
715static void 723static void