]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge branch 'master' of ssh://git.ikiwiki.info
authorJoey Hess <joey@kitenet.net>
Mon, 17 Feb 2014 16:24:54 +0000 (12:24 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 17 Feb 2014 16:24:54 +0000 (12:24 -0400)
IkiWiki.pm
IkiWiki/Plugin/openid.pm
IkiWiki/Plugin/pinger.pm
debian/changelog

index b7080bb0b3ff14f1af78dd1633a1f05ed722d6d6..eb480969bd6fc0b72565a09fbb607a97fb94d52d 100644 (file)
@@ -527,6 +527,14 @@ sub getsetup () {
                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 () {
@@ -2301,6 +2309,7 @@ sub useragent () {
        return LWP::UserAgent->new(
                cookie_jar => $config{cookiejar},
                env_proxy => 1,         # respect proxy env vars
+               agent => $config{useragent},
        );
 }
 
index d369e30c995277f8a5e7f5bccdd5cd17dbcea0aa..3b96e4b8e411c5f29afc25b58e15cdfd9f70121d 100644 (file)
@@ -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();
index fb0f3ba0aa9cf9676f95eaded1f4569504015c99..b2d54af8ac269cd63e95913073919cfd2b496052 100644 (file)
@@ -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};
index 41559ea37933166fb9cf26941479ae2cb57cace0..208da2a0f4e1da6d4e2990f11cdd7c50a009320c 100644 (file)
@@ -1,3 +1,10 @@
+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