SL-16192 Add version info into LLXMLRPCTransaction's http header
parent
493a3a31ff
commit
57f654e2ed
|
|
@ -40,6 +40,7 @@
|
|||
#include "httpoptions.h"
|
||||
#include "httpheaders.h"
|
||||
#include "bufferarray.h"
|
||||
#include "llversioninfo.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
// Have to include these last to avoid queue redefinition!
|
||||
|
|
@ -378,6 +379,15 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip, const
|
|||
|
||||
httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML);
|
||||
|
||||
std::string user_agent = llformat("%s %d.%d.%d (%d)",
|
||||
LLVersionInfo::instance().getChannel().c_str(),
|
||||
LLVersionInfo::instance().getMajor(),
|
||||
LLVersionInfo::instance().getMinor(),
|
||||
LLVersionInfo::instance().getPatch(),
|
||||
LLVersionInfo::instance().getBuild());
|
||||
|
||||
httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, user_agent);
|
||||
|
||||
///* Setting the DNS cache timeout to -1 disables it completely.
|
||||
//This might help with bug #503 */
|
||||
//httpOpts->setDNSCacheTimeout(-1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue