headers = evhttp_request_get_output_headers(req);evhttp_add_header(headers,"Host", hostname_port);evhttp_add_header(headers,"Connection","close");/*evhttp_add_header(headers, "User-Agent", "***");*/returnevhttp_make_request(d->desc_conn, req, EVHTTP_REQ_GET, path); } 开发者ID:min...
* server using our make request method. */req = evhttp_request_new(close_detect_cb, evcon);/* Add the information that we care about */evhttp_add_header(req->output_headers,"Host","somehost");/* We give ownership of the request to the connection */if(evhttp_make_request(evcon, req...