I know that, the http clients sends 0x10
0x13
bytes to inform the http server that the request data has finished.
But how the server informs the http clients that the response data has finished? (it sends -1
i.e. <EOF>
correct)?
I know that, the http clients sends 0x10
0x13
bytes to inform the http server that the request data has finished.
But how the server informs the http clients that the response data has finished? (it sends -1
i.e. <EOF>
correct)?
No. HTTP Clients do not send CRLF to the server to indicate that the request is complete, and servers do not send a particular byte sequence to the client to indicate completion. You should read this document: http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4 to understand how clients and servers are able to determine when a request or response is complete. The short summary is that the Content-Length header, Chunked Transfer-encoding terminator, or TCP/IP connection closure are all used as signals.