aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorTuomas Jormola <tj@solitudo.net>2014-01-30 14:41:55 +0200
committerJoey Hess <joey@kitenet.net>2014-02-01 16:53:33 -0400
commitdc53ca18f2bbbfe93be2786680f3afe1bd24afea (patch)
tree0e331e14820a64b0d95ed9c751e1c6b7031fbb99 /IkiWiki/Plugin
parent79e40f031811c38ed9eb6e3c17dfded63310b5eb (diff)
downloadikiwiki-dc53ca18f2bbbfe93be2786680f3afe1bd24afea.tar
ikiwiki-dc53ca18f2bbbfe93be2786680f3afe1bd24afea.tar.gz
Bug#737121: ikiwiki: [PATCH] Implement configuration option to set the user agent string for outbound HTTP requests
Package: ikiwiki Version: 3.20140125 Severity: wishlist By default, LWP::UserAgent used by IkiWiki to perform outbound HTTP requests sends the string "libwww-perl/<version number>" as User-Agent header in HTTP requests. Some blogging platforms have blacklisted the user agent and won't serve any content for clients using this user agent string. With IkiWiki configuration option "useragent" it's now possible to define a custom string that is used for the value of the User-Agent header.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/openid.pm2
-rw-r--r--IkiWiki/Plugin/pinger.pm2
2 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm
index d369e30c9..3b96e4b8e 100644
--- a/IkiWiki/Plugin/openid.pm
+++ b/IkiWiki/Plugin/openid.pm
@@ -238,7 +238,7 @@ sub getobj ($$) {
my $ua;
eval q{use LWPx::ParanoidAgent};
if (! $@) {
- $ua=LWPx::ParanoidAgent->new;
+ $ua=LWPx::ParanoidAgent->new(agent => $config{useragent});
}
else {
$ua=useragent();
diff --git a/IkiWiki/Plugin/pinger.pm b/IkiWiki/Plugin/pinger.pm
index fb0f3ba0a..b2d54af8a 100644
--- a/IkiWiki/Plugin/pinger.pm
+++ b/IkiWiki/Plugin/pinger.pm
@@ -72,7 +72,7 @@ sub ping {
my $ua;
eval q{use LWPx::ParanoidAgent};
if (!$@) {
- $ua=LWPx::ParanoidAgent->new;
+ $ua=LWPx::ParanoidAgent->new(agent => $config{useragent});
}
else {
eval q{use LWP};