The download that stopped at 802,816 octets
A transfer dies three-quarters of the way through a file. The client reconnects, selects Image type, sends REST 802816, collects a 350, and follows with RETR. The server picks up mid-file and nothing is sent twice. It is one of the quiet miracles of the early Internet — and it rests on a promise the protocol never actually made.
The 350 reply says one thing only: the server has saved a restart value for the next transfer command. It does not say the remote file is still the same version. It does not say the local prefix came from that file. It does not say octet 802,817 begins the suffix anybody wanted. The number is cheap and useful precisely because it leaves those facts outside itself.
The short version
- Early FTP restart paired sender and receiver checkpoints, carrying storage state and transformation state along with them.
REST STREAMlater flattened all of that into a transmitted-octet offset. - A marker says where to continue only inside one transfer context. It never proves a pathname still names the same version, or that the saved prefix belongs to it.
- RFC 3659's worked example quietly concedes the gap: the server file must be verified unchanged before resuming. That sentence is the border between bandwidth recovery and object integrity.
Before the marker became a number
RFC 765 already treated restart as error recovery. Its REST command moved no file data at all; it asked the server to position itself at a marker, after which the interrupted service command had to follow.
That marker was deliberately not defined as a universal byte number. FTP connected machines whose files could use different word sizes, character encodings, line conventions and record structures. The protocol kept the logical byte of a stored file separate from the eight-bit transfer byte, and let TYPE, STRUcture and MODE jointly decide what appeared on the data connection.
RFC 959 kept the heterogeneous model. Block and Compressed modes could insert distinguishable restart-marker blocks into a formatted data stream: a sender could pack enough information into a marker to find its position again, and a receiver could correlate that marker with the way it had stored the arriving file. Two unlike filesystems never had to agree on one universal coordinate system. Each side only had to recognise its own.
One checkpoint, two local meanings
RFC 1123 repaired an error in RFC 959's description of the restart reply. The corrected form paired ssss, a position in the sender's system, with rrrr, the corresponding position in the receiver's. The encodings could stay implementation-specific because each value would eventually return to the system that created it.
That pair carried more than progress. Before reporting its side of the checkpoint, the receiver was advised to force all preceding data to stable storage — otherwise a marker could promise recovery from bytes that vanished in the same crash that interrupted the transfer.
Transformation state mattered just as much. RFC 1123 gives a precise example: during TYPE A conversion a receiver might turn CR LF on the wire into a single local LF. If a restart marker arrived between the CR and the LF, the receiving position had to remember that the CR had already been seen and discarded. A bare disk offset cannot reconstruct a decoder's state.
The document also defined 554 for a position that could not be restored and 555 for a mismatch between the existing partial file and the current TYPE or STRUcture. Even a syntactically perfect marker was conditional.
Stream mode traded opacity for counting
The marker system was capable and heavy. RFC 1123 described restart, ABOR and Block mode as valuable robustness features that were not widely implemented in 1989; REST was not in its minimum FTP command set.
Ordinary Stream mode offered a simpler opportunity. Its data connection carries unformatted octets, so an inserted marker would be indistinguishable from file content. RFC 3659 standardised the other interpretation: for REST STREAM, the decimal value is the number of octets the next transfer will skip.
The extension had to be discoverable. A server supporting this form announces REST STREAM through FEAT, the feature-negotiation mechanism defined by RFC 2389. No client needed to infer support from a brand name or a failed experiment.
Counting did not remove representation. RFC 3659 shows one stored text file whose SIZE is 1,830 in TYPE I but 1,942 in TYPE A, because line endings acquire extra transmitted octets. The restart number belongs to the stream that would be sent under the selected parameters, not automatically to the local file's native byte layout.
For a resumed upload the distinction is operational. The client needs to know how much the server correctly received and saved. SIZE can supply the transmitted length under the current TYPE, but a length is still a length. It is not a digest of the saved prefix.
A position cannot identify its object
RFC 3659's example is unusually candid. Before resuming at 802,816 it states that the previous transfer used TYPE I and that the file on the server has been verified not to have changed.
REST performs none of that verification. If the pathname now resolves to a different file of sufficient length, the same offset is accepted and the client cheerfully welds an old prefix onto a new suffix. Equal size cures nothing; two versions can share a length. A successful final reply proves the requested FTP operation completed, not that the assembled bytes are the object the operator had in mind.
Upload restart has sharper limits. RFC 3659 defines it as completion of a previously failed transfer. If the restart point is not at the end of the bytes already stored, or the new data does not extend the object to at least its previous size, the effects are undefined. APPE is no shortcut around that contract: if it is allowed after REST, it must behave like STOR at the selected position.
Sequencing is part of the state
REST must be the last command before the transfer command. A server can accept the marker with 350 and still reject the following RETR or STOR when it discovers the position is out of range or cannot be applied. If the transfer command was not successfully sent, a careful client sends REST again rather than assuming the saved value survived unrelated dialogue.
Recovery state is therefore scattered across several places: local partial data, the selected representation, server capability, the saved marker, the next command, and whatever identity checks surround the pathname. Treating the offset as the whole state machine is the mistake — and it is a mistake that outlived FTP, migrating intact into every modern resume button that trusts a byte count and a timestamp.
Sources and evidence limits
The original checkpoint model is documented in RFC 765; the classic command set and transfer modes in RFC 959; the corrected paired-marker and stable-storage procedure in RFC 1123; feature discovery in RFC 2389; and STREAM restart, SIZE, sequencing and worked examples in RFC 3659. These standards establish semantics, not present deployment share, and they do not prove that any particular server preserves versions. FTP restart is not authentication, not a content hash, not exactly-once transfer, and not a storage snapshot.
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






