diff options
Diffstat (limited to 'src/httpfetch.cpp')
-rw-r--r-- | src/httpfetch.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 |