safe => 0, # hooks into perl module internals
rebuild => 0,
},
+ useragent => {
+ type => "string",
+ default => undef,
+ example => "Wget/1.13.4 (linux-gnu)",
+ description => "set custom user agent string for outbound HTTP requests e.g. when fetching aggregated RSS feeds",
+ safe => 0,
+ rebuild => 0,
+ },
}
sub defaultconfig () {
return LWP::UserAgent->new(
cookie_jar => $config{cookiejar},
env_proxy => 1, # respect proxy env vars
+ agent => $config{useragent},
);
}
my $ua;
eval q{use LWPx::ParanoidAgent};
if (! $@) {
- $ua=LWPx::ParanoidAgent->new;
+ $ua=LWPx::ParanoidAgent->new(agent => $config{useragent});
}
else {
$ua=useragent();
my $ua;
eval q{use LWPx::ParanoidAgent};
if (!$@) {
- $ua=LWPx::ParanoidAgent->new;
+ $ua=LWPx::ParanoidAgent->new(agent => $config{useragent});
}
else {
eval q{use LWP};
+ikiwiki (3.20140126) UNRELEASED; urgency=medium
+
+ * Added useragent config setting. Closes: #737121
+ Thanks, Tuomas Jormola
+
+ -- Joey Hess <joeyh@debian.org> Sat, 01 Feb 2014 16:53:35 -0400
+
ikiwiki (3.20140125) unstable; urgency=medium
* inline: Allow overriding the title of the feed. Closes: #735123