summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-01-11 16:25:44 +0100
committerDan McGee <dan@archlinux.org>2008-01-12 02:29:44 +0100
commit318d5c4ba87b699c3a902bf906f55a3f905a1650 (patch)
treee5ee1356a13dfbee3d3bd823b62b08265ff93c38
parentf9a7d8cba4ec1833d32dc8a9403053564b68d18a (diff)
downloadpacman-318d5c4ba87b699c3a902bf906f55a3f905a1650.tar.gz
pacman-318d5c4ba87b699c3a902bf906f55a3f905a1650.tar.xz
Make the user-agent string a bit less verbose
We shouldn't pass things like the kernel version in the user agent string, as it may be a bit too revealing and is not really necessary. Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=57555 Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--src/pacman/pacman.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 4171055a..1aa29682 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -179,14 +179,12 @@ static void localize(void)
*/
static void setuseragent(void)
{
- const char *pacman = "Pacman/" PACKAGE_VERSION;
- const char *libalpm = "libalpm/" LIB_VERSION;
char agent[101];
struct utsname un;
uname(&un);
- snprintf(agent, 100, "%s (%s %s %s; %s) %s", pacman, un.sysname,
- un.machine, un.release, setlocale(LC_MESSAGES, NULL), libalpm);
+ snprintf(agent, 100, "pacman/" PACKAGE_VERSION " (%s %s) libalpm/" LIB_VERSION,
+ un.sysname, un.machine);
setenv("HTTP_USER_AGENT", agent, 0);
}