refactored http_read_request() and updated tests