next up previous
Next: The FTP Session with Up: The FTP Protocol Previous: Requesting Server Information: The

Terminating the FTP Session: The QUIT command

A QUIT request asks the server to close the connection:

>    QUIT
<     221 Bye.

QUIT parameters are prohibited. Some servers may reject any QUIT request with a nonempty parameter.

If the server accepts the QUIT request (required code 221), it then closes the connection without reading further requests. The server also stops listening for data connections and drops any data connections already accepted.

Note: The client can, in some cases, simply close the connection without sending QUIT. This saves time and memory for both the client and the server. Servers may also close connections without QUIT in some circumstances, for example because of a crash.

Dave Marshall