• For reference, here's what the HTTP/1.0 protocol spec says about the cloding of connections (http://www.w3.org/Protocols/HTTP/1.0/spe­c.html#Operation):

    Except for experimental applications, current practice requires that the connection be established by the client prior to each request and closed by the server after sending the response. Both clients and servers should be aware that either party may close the connection prematurely, due to user action, automated time-out, or program failure, and should handle such closing in a predictable fashion. In any case, the closing of the connection by either or both parties always terminates the current request, regardless of its status.

    HTTP/1.1 added a whole section on this topic: http://www.w3.org/Protocols/rfc2616/rfc2­616-sec8.html#sec8.1 the most relevant part is perhaps:

    Clients and servers SHOULD NOT assume that a persistent connection is maintained for HTTP versions less than 1.1 unless it is explicitly signaled. See section 19.6.2 for more information on backward compatibility with HTTP/1.0 clients.

    Also, remember that each direction of a TCP connection can be closed independently. For example, the client may close its output, which has zero effect on the other (server->client) direction. I did not see a way to do this or detect this using the Espressif SDK, however. Sigh...

About

Avatar for tve @tve started