简体   繁体   中英

TCP handshake for HTTP Response?

Since HTTP is an application layer protocol using TCP, if I request to download a big file via HTTP here is what happens:

My HTTP request is going to be fragmented into TCP packets, and TCP is going to do a 3-way handshake and send my request packets to server. My question is the response from server ( the file) going to pass through old TCP connection, or server initiates another Transport layer connection with my browser and another 3-way handshake in order to send me the file?

The file transfer will use the existing connection. that will however make the connection busy until the file is transferred.

So if the user clicks on a link while the file is downloaded the connection is then busy. The web browser will therefore have to open an additional connection to be able to request the clicked url.

In HTTP/1.1 existing connections will be used if idle (idle connections will be closed when a period of time have passed).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM