http_request: avoid StringIO.new for GET/HEAD requests