From: Andrej E Baranov Date: Mon, 28 Jan 2013 23:41:32 +0000 (+0100) Subject: gitweb: refer to picon/gravatar images over the same scheme X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/c0fb14d29148dd66a9030708f8d74010dfbd4308aace6b65f9916eae7153d5ff?ds=inline gitweb: refer to picon/gravatar images over the same scheme With the current code, the images from picon and gravatar are requested over http://, and browsers give mixed contents warning when gitweb is served over https://. Just drop the scheme: part from the URL, so that these external sites are accessed over https:// in such a case. Signed-off-by: Andrej E Baranov Signed-off-by: Junio C Hamano --- diff --git a/gitweb.perl b/gitweb.perl index a42c311..b04e128 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -2069,7 +2069,7 @@ sub picon_url { if (!$avatar_cache{$email}) { my ($user, $domain) = split('@', $email); $avatar_cache{$email} = - "http://www.cs.indiana.edu/cgi-pub/kinzler/piconsearch.cgi/" . + "//www.cs.indiana.edu/cgi-pub/kinzler/piconsearch.cgi/" . "$domain/$user/" . "users+domains+unknown/up/single"; } @@ -2084,7 +2084,7 @@ sub gravatar_url { my $email = lc shift; my $size = shift; $avatar_cache{$email} ||= - "http://www.gravatar.com/avatar/" . + "//www.gravatar.com/avatar/" . Digest::MD5::md5_hex($email) . "?s="; return $avatar_cache{$email} . $size; }