Add headers on 'handshake'

The headers in the 'handshake' event were not written to the socket, the client received data but not the headers.