Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: Parsing a text file without newlines

by Fletch (Bishop)
on Dec 14, 2004 at 14:16 UTC ( [id://414709]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Parsing a text file without newlines
in thread Parsing a text file without newlines

That seems like broken behavior on either the client or ftpd's part then. Quoting from the FTP RFC:

3.1.1.1. ASCII TYPE This is the default type and must be accepted by all FTP implementations. It is intended primarily for the transfe +r of text files, except when both hosts would find the EBCDI +C type more convenient. The sender converts the data from an internal character representation to the standard 8-bit NVT-ASCII representation (see the Telnet specification). The receiv +er will convert the data from the standard form to his own internal form. In accordance with the NVT standard, the <CRLF> sequence should be used where necessary to denote the end of a line of text. (See the discussion of file structure at the end of the Section on Data Representation and Storage.) Using the standard NVT-ASCII representation means that dat +a must be interpreted as 8-bit bytes. The Format parameter for ASCII and EBCDIC types is discuss +ed below.

As that reads, the protocol says in ascii mode you convert to the network line ending (CRLF) when sending and from CRLF to native on receipt. If your client or server's just stripping CR blindly it's not living up to the spec.

I did just now test this with the stock NT 2000 ftp.exe and vsftpd that I had installed on RH9 and it did just strip CRs, so the original post was correct about how things work (I still say it's broken though :).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://414709]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found