home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.protocols.tcp-ip
- Path: sparky!uunet!munnari.oz.au!uniwa!cujo!NewsWatcher!user
- From: peter@cujo.curtin.edu.au (Peter N Lewis)
- Subject: FTP RFC and multi-line replies?
- Message-ID: <peter-020992112136@134.7.50.3>
- Followup-To: comp.protocols.tcp-ip
- Sender: news@cujo.curtin.edu.au (News Manager)
- Organization: NCRPDA, Curtin University
- Date: Wed, 2 Sep 1992 03:30:28 GMT
- Lines: 50
-
- Hi All,
-
- I've noticed that some ftp servers implement multi-line replies like this:
-
- 123-Message
- 123-Message line 2
- 123-Message line 3
- 123 Mesage last line
-
- Now, my reading of this section of the RFC:
-
- Thus the format for multi-line replies is that the first line
- will begin with the exact required reply code, followed
- immediately by a Hyphen, "-" (also known as Minus), followed by
- text. The last line will begin with the same code, followed
- immediately by Space <SP>, optionally some text, and the Telnet
- end-of-line code.
-
- For example:
- 123-First line
- Second line
- 234 A line beginning with numbers
- 123 The last line
-
- The user-process then simply needs to search for the second
- occurrence of the same reply code, followed by <SP> (Space), at
- the beginning of a line, and ignore all intermediary lines. If
- an intermediary line begins with a 3-digit number, the Server
- must pad the front to avoid confusion.
-
- In particular the last sentence, would indicate that the above format is in
- fact illegal (although any client should be able to cope with both, since
- they should be searching for a line that starts with '123<space>'). As
- well as that it looks much worse than padding each message line with
- spaces:
-
- 123-Message
- Message line 2
- Message line 3
- 123 Mesage last line
-
- But thats neither here nor there. I'm wondering if there is any
- disagreement on this point, is the first format actually valid?
-
- Thanks for any info,
- Peter.
-
- _______________________________________________________________________
- Peter N Lewis, NCRPDA, Curtin University peter@cujo.curtin.edu.au
- GPO Box U1987, Perth WA 6001, AUSTRALIA FAX: +61 9 367 8141
-