diff options
author | Amitai Schlair <schmonz-web-ikiwiki@schmonz.com> | 2013-07-27 08:12:01 -0400 |
---|---|---|
committer | Amitai Schlair <schmonz-web-ikiwiki@schmonz.com> | 2013-07-27 08:12:01 -0400 |
commit | 462d8f8015db338c7a5c718f1b92006c2bee9cfe (patch) | |
tree | c43f8b0919dd4859677be59e73fbee81e7364040 /IkiWiki.pm | |
parent | 07cb6368aa2d6404ea24186be816b2d07afec071 (diff) | |
download | ikiwiki-462d8f8015db338c7a5c718f1b92006c2bee9cfe.tar ikiwiki-462d8f8015db338c7a5c718f1b92006c2bee9cfe.tar.gz |
Honor proxy env vars and reliably honor cookiejar.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index c497dd38f..3fc0c7d8a 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -22,7 +22,7 @@ our @EXPORT = qw(hook debug error htmlpage template template_depends htmllink readfile writefile pagetype srcfile pagename displaytime strftime_utf8 will_render gettext ngettext urlto targetpage add_underlay pagetitle titlepage linkpage newpagefile - inject add_link add_autofile + inject add_link add_autofile useragent %config %links %pagestate %wikistate %renderedfiles %pagesources %destsources %typedlinks); our $VERSION = 3.00; # plugin interface version, next is ikiwiki version @@ -2274,6 +2274,13 @@ sub add_autofile ($$$) { $autofiles{$file}{generator}=$generator; } +sub useragent () { + return LWP::UserAgent->new( + cookie_jar => $config{cookiejar}, + env_proxy => 1, # respect proxy env vars + ); +} + sub sortspec_translate ($$) { my $spec = shift; my $reverse = shift; |