5 2 (HTTP&FTP)
5 2 (HTTP&FTP)
Command Explanation
close disconnects the existing FTP connection but does not quit the FTP client..
quit disconnects the existing connection and also exits the FTP client.
bye It is used to terminate the ftp session and exit
ls It is used to list the names of the files in the current remote directory.
put This command is used to copy a file from the local machine(client) to the remote mach
(server)..
It is used to copy multiple files from the remote machine(server) to the local
mget
machine(client).
A] Request Message:
• The request message is sent by the client that consists of a request line, headers,
and sometimes a body.
• HTTP request is information or data that is needed by Internet browsers for
loading a website.
• It contains -HTTP Version ,URL,HTTP Method, HTTP Request Header ,HTTP Body.
• HTTP Request Header- generally store information in the form of key-value. It
provides core information about the client.
• HTTP Request Body- contains the information that has to be transferred. HTTP
Request has the information or data to be sent to these browsers
B] Response Message:
• The response message is sent by the server to the client that consists of a status
line, headers, and sometimes a body.
• HTTP Response is simply the answer to HTTP Request .
• It contain HTTP Status Code, HTTP Headers ,HTTP Body.
• HTTP header specifies the configuration of the server and also the special
information about the request.
• The HTTP body part mainly contains the document to be sent or received.
• HTTP Status Codes are the 3-digit codes that inform about the HTTP Request
whether it has been completed or not.(Ex- 2-Reqest completed,4-client side error)
C] Working of HTTP
• The HTTP makes use of Client-server architecture.
• The browser acts as the HTTP client and this client mainly communicates with
the web-server that is hosting the website.
• At the time when a web-client makes a request for some information to the
web-server , the browser then sends a Request message to the HTTP server
for the requested objects.
• After that the following things happen:
1) The connection becomes open between the web-client and the web-server
through the TCP.
2) After that, the HTTP sends a request to the server that mainly consists of
requested data.
3) The response with the objects is sent back to the client by HTTP
• At last, HTTP closes the connection.