Fixed tests. Closes #184 and #185

The response it not sent due to the connection not allowing half-open connections. This should address #184.
The end event is not received due to a missing data handler. This should address #185.