fixes in http_request.rb

with test cases