Remove architecture from UA string.
This commit is contained in:
parent
96264ca71e
commit
4e756f6088
|
@ -78,9 +78,9 @@ NETSURF_USE_HARU_PDF := NO
|
|||
NETSURF_STRIP_BINARY := NO
|
||||
|
||||
# Template used for constructing the User Agent: string. The first two
|
||||
# replacements are major/minor version, second two are OS and architecture.
|
||||
# replacements are major/minor version, next is OS.
|
||||
# Please don't be tempted to mention Mozilla here! Let's let that lie die.
|
||||
NETSURF_UA_FORMAT_STRING := "NetSurf/%d.%d (%s; %s)"
|
||||
NETSURF_UA_FORMAT_STRING := "NetSurf/%d.%d (%s)"
|
||||
|
||||
# Default home page, if one is not defined by the user. Note that this
|
||||
# option does not apply to the RISC OS version, as it has its own local
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
static const char *core_user_agent_string = NULL;
|
||||
|
||||
#ifndef NETSURF_UA_FORMAT_STRING
|
||||
#define NETSURF_UA_FORMAT_STRING "NetSurf/%d.%d (%s; %s)"
|
||||
#define NETSURF_UA_FORMAT_STRING "NetSurf/%d.%d (%s)"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -41,20 +41,17 @@ user_agent_build_string(void)
|
|||
{
|
||||
struct utsname un;
|
||||
const char *sysname = "Unknown";
|
||||
const char *machine = "Unknown";
|
||||
char *ua_string;
|
||||
int len;
|
||||
|
||||
if (uname(&un) >= 0) {
|
||||
sysname = un.sysname;
|
||||
machine = un.machine;
|
||||
}
|
||||
|
||||
len = snprintf(NULL, 0, NETSURF_UA_FORMAT_STRING,
|
||||
netsurf_version_major,
|
||||
netsurf_version_minor,
|
||||
sysname,
|
||||
machine);
|
||||
sysname);
|
||||
ua_string = malloc(len + 1);
|
||||
if (!ua_string) {
|
||||
/** \todo this needs handling better */
|
||||
|
@ -64,8 +61,7 @@ user_agent_build_string(void)
|
|||
NETSURF_UA_FORMAT_STRING,
|
||||
netsurf_version_major,
|
||||
netsurf_version_minor,
|
||||
sysname,
|
||||
machine);
|
||||
sysname);
|
||||
|
||||
core_user_agent_string = ua_string;
|
||||
|
||||
|
|
Loading…
Reference in New Issue