mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-19 21:56:13 +00:00
Fixed: #1444 Add details for user-agent
This commit is contained in:
parent
dbc2f45725
commit
04df89ce48
1 changed files with 32 additions and 1 deletions
|
@ -31,6 +31,10 @@ extern "C"
|
|||
|
||||
#include "interface_v3/libwww_nel_stream.h"
|
||||
|
||||
#ifdef HAVE_REVISION_H
|
||||
#include "revision.h"
|
||||
#endif
|
||||
|
||||
using namespace NLMISC;
|
||||
|
||||
/// the cookie value for session identification (nel cookie)
|
||||
|
@ -552,8 +556,35 @@ void initLibWWW()
|
|||
|
||||
/* Initiate libwww */
|
||||
|
||||
#if defined(HAVE_X86_64)
|
||||
#define RYZOM_ARCH "x64"
|
||||
#elif defined(HAVE_X86)
|
||||
#define RYZOM_ARCH "x86"
|
||||
#elif defined(HAVE_ARM)
|
||||
#define RYZOM_ARCH "arm"
|
||||
#else
|
||||
#define RYZOM_ARCH "unknow"
|
||||
#endif
|
||||
|
||||
#if defined(NL_OS_WINDOWS)
|
||||
#define RYZOM_SYSTEM "windows"
|
||||
#elif defined(NL_OS_MAC)
|
||||
#define RYZOM_SYSTEM "mac"
|
||||
#elif defined(NL_OS_UNIX)
|
||||
#define RYZOM_SYSTEM "unix"
|
||||
#else
|
||||
#define RYZOM_SYSTEM "unkown"
|
||||
#endif
|
||||
char buffer[256];
|
||||
|
||||
#ifdef REVISION
|
||||
sprintf(buffer, "%s.%s-%s-%s", RYZOM_VERSION, REVISION, RYZOM_SYSTEM, RYZOM_ARCH);
|
||||
#else
|
||||
sprintf(buffer, "%s-%s-%s", RYZOM_VERSION, RYZOM_SYSTEM, RYZOM_ARCH);
|
||||
#endif
|
||||
|
||||
HTLib_setAppName("Ryzom");
|
||||
HTLib_setAppVersion(RYZOM_VERSION);
|
||||
HTLib_setAppVersion(buffer);
|
||||
|
||||
/* Set up TCP as transport */
|
||||
VerifyLibWWW("HTTransport_add", HTTransport_add("buffered_tcp", HT_TP_SINGLE, HTReader_new, HTBufferWriter_new));
|
||||
|
|
Loading…
Reference in a new issue