4d0b0cd4c7
TLS defines a mechanism for gracefully closing a connection via a closure alert. We currently ignore this alert since it is a warning rather than an error, and warnings are allowed to be ignored. In almost all cases, a higher-level protocol such as HTTP will already give us the information required to know when the connection should be closed. In the very rare case of an HTTPS server that does not send a Content-Length header and does not close the TCP connection, only the closure alert indicates that the whole file has been retrieved. Handle a received closure alert by gracefully closing the connection. Reported-by: Tuomo Tanskanen <tuomo.tanskanen@est.tech> Signed-off-by: Michael Brown <mcb30@ipxe.org>