Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Set user agent to pkg/PKGVERSION
Baptiste Daroussin committed 13 years ago
commit 04a79c9c7e58c8246e9e0183ac892f4c852d0433
parent 36844ab
1 file changed +1 -0
modified libpkg/fetch.c
@@ -84,6 +84,7 @@ gethttpmirrors(struct pkg_fetch *fetch, const char *url) {
int
pkg_fetch_new(struct pkg_fetch **f)
{
+
	setenv("HTTP_USER_AGENT", "pkg/"PKGVERSION, 1);
	if ((*f = calloc(1, sizeof(struct pkg_fetch))) == NULL) {
		pkg_emit_errno("calloc", "fetch");
		return (EPKG_FATAL);