httpResponseFactory and tests
bugfix: client closed
sending response to the client