From: Scott Cantor Date: Fri, 9 Jan 2015 04:30:39 +0000 (+0000) Subject: https://issues.shibboleth.net/jira/browse/CPPXT-99 X-Git-Tag: 1.5.4~16 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=commitdiff_plain;h=ba80fe4167b68359c8f6c90d1f9cd55465b4c0c7 https://issues.shibboleth.net/jira/browse/CPPXT-99 --- diff --git a/xmltooling/soap/impl/CURLSOAPTransport.cpp b/xmltooling/soap/impl/CURLSOAPTransport.cpp index b2490fb..08a4553 100644 --- a/xmltooling/soap/impl/CURLSOAPTransport.cpp +++ b/xmltooling/soap/impl/CURLSOAPTransport.cpp @@ -535,11 +535,11 @@ void CURLSOAPTransport::send(istream* in) m_useragent = XMLToolingConfig::getConfig().user_agent; if (!m_useragent.empty()) { curl_version_info_data* curlver = curl_version_info(CURLVERSION_NOW); - m_useragent += " libcurl/"; - if (curlver) - m_useragent = m_useragent + curlver->version + ' ' + curlver->ssl_version; - else - m_useragent = m_useragent + LIBCURL_VERSION + ' ' + OPENSSL_VERSION_TEXT; + + if (curlver) { + m_useragent = m_useragent + " libcurl/" + curlver->version + ' ' + curlver->ssl_version; + } + curl_easy_setopt(m_handle, CURLOPT_USERAGENT, m_useragent.c_str()); }