Fixed bug with writing responses
Connections are now closed after response is send if client requested "Connection: close"