From 51e8a4eeda24f0a2cfdb0e579ddf1e6df9972544 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 30 Mar 2011 11:00:55 -0400 Subject: [PATCH] check site url for https HTTPS won't be set when rebuilding a site at the command line --- IkiWiki/Plugin/comments.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index fcce6c5a6..cb0196728 100755 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -191,15 +191,17 @@ sub preprocess { eval q{use Libravatar::URL}; if (! $@) { + my $https=defined $config{url} && $config{url}=~/^https:/; + if (defined $commentopenid) { eval { - $commentauthoravatar = libravatar_url(openid => $commentopenid, https => $ENV{HTTPS}); + $commentauthoravatar = libravatar_url(openid => $commentopenid, https => $https); } } if (! defined $commentauthoravatar && (my $email = IkiWiki::userinfo_get($commentuser, 'email'))) { eval { - $commentauthoravatar = libravatar_url(email => $email, https => $ENV{HTTPS}); + $commentauthoravatar = libravatar_url(email => $email, https => $https); } } } -- 2.44.0