Refactor HTTP testing.

 On branch master
	modified:   lib/http.js
	modified:   test/http_test.js