Reputation: 1305
I am currently implementing the ftp protocol on one of my project (ftp client part). I am following the RFC959
In this RFC, i am facing a problem : the escape character, indeed, it described that it has to be used an escape character. But I have no idea what is the specific character.
Here is the part of the RFC about the escape character :
3.4.1. STREAM MODE
The data is transmitted as a stream of bytes. There is no
restriction on the representation type used; record structures
are allowed.
In a record structured file EOR and EOF will each be indicated
by a two-byte control code. The first byte of the control code
will be all ones, the escape character. The second byte will
have the low order bit on and zeros elsewhere for EOR and the
second low order bit on for EOF; that is, the byte will have
value 1 for EOR and value 2 for EOF. EOR and EOF may be
indicated together on the last byte transmitted by turning both
low order bits on (i.e., the value 3). If a byte of all ones
was intended to be sent as data, it should be repeated in the
second byte of the control code.
If the structure is a file structure, the EOF is indicated by
the sending host closing the data connection and all bytes are
data bytes.
Does anyone know what is the character ?
In general, do you have some clues on how to tell the FTP server that I have finished to send my file ?
Thank you by advance.
Upvotes: 2
Views: 1183
Reputation: 8372
"The first byte of the control code will be all ones, the escape character." - in other words - 0xff
Upvotes: 5