The server responds to a connection by sending a test HTML page.
Refactoring + implemented graceful connection finishing