HTTP Persistent Connections
Last class there was an interesting question regarding the interaction between a server and an application -browser for instance-, and how do they decide to close the connection.
The procedure is rather well defined, and is documented in the HTTP RFC, in the following section: http://www.w3.org/Protocols/rfc2616/rfc ... .html#sec8
A second question was: How do I know if there's body comming after the header. That's also defined in the RFC: "The presence of a message-body in a request is signaled by the inclusion of a Content-Length or Transfer-Encoding header field in the request's message-headers"
Finally, how do we know whether we have received the whole content, it is also defined (content-length headers and Transfer-Encoding headers): http://www.w3.org/Protocols/rfc2616/rfc ... .html#sec4