How HTTP Server inform its clients that the respon

2019-09-02 23:47发布

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)?

1条回答
我只想做你的唯一
2楼-- · 2019-09-02 23:55

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.

查看更多
登录 后发表回答