X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Futil%2FCurlURLInputStream.cpp;h=4918546d197e4012f14b233cb933bac7e6cc58ff;hb=5dc7441ece138216cc7bc5ea4f0872adfa20ff96;hp=219cf97d9607b0ad1cd515c79aca877292385e03;hpb=a6bb711f4858713d32ee24c9791b74d7d88e812a;p=shibboleth%2Fxmltooling.git diff --git a/xmltooling/util/CurlURLInputStream.cpp b/xmltooling/util/CurlURLInputStream.cpp index 219cf97..4918546 100644 --- a/xmltooling/util/CurlURLInputStream.cpp +++ b/xmltooling/util/CurlURLInputStream.cpp @@ -273,6 +273,12 @@ void CurlURLInputStream::init(const DOMElement* e) curl_easy_setopt(fEasy, CURLOPT_NOSIGNAL, 1); curl_easy_setopt(fEasy, CURLOPT_FAILONERROR, 1); curl_easy_setopt(fEasy, CURLOPT_ENCODING, ""); + string ua = XMLToolingConfig::getConfig().user_agent; + if (!ua.empty()) { + ua = ua + " libcurl/" + LIBCURL_VERSION + ' ' + OPENSSL_VERSION_TEXT; + curl_easy_setopt(fEasy, CURLOPT_USERAGENT, ua.c_str()); + } + // Install SSL callback. curl_easy_setopt(fEasy, CURLOPT_SSL_CTX_FUNCTION, ssl_ctx_callback);