fixed tests.

TODO: close connection for http 1.1 and timeout for keep alive
connections