From b03135548bbd9bcb73d14b067b96ec913404dd5f Mon Sep 17 00:00:00 2001 From: Kahrl Date: Thu, 29 Aug 2013 05:58:13 +0200 Subject: Use httpfetch_async in serverlist announce code --- src/httpfetch.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/httpfetch.cpp') diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp index 4342a8b2a..25474c725 100644 --- a/src/httpfetch.cpp +++ b/src/httpfetch.cpp @@ -206,6 +206,10 @@ struct HTTPFetchOngoing request.timeout); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, request.connect_timeout); + + if (request.useragent != "") + curl_easy_setopt(curl, CURLOPT_USERAGENT, request.useragent.c_str()); + // Set up a write callback that writes to the // ostringstream ongoing->oss, unless the data // is to be discarded -- cgit v1.2.3