Fixes and improvements for http_request testing