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 <admin@andrej-andb.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Andrej E Baranov committed
Jan 29, 2013 at 00:41 UTC
574855814f97bf0dc37133574fa3fa2a5a44555d
1 file changed
+2
-2
gitweb/gitweb.perl
+2
-2
@@ -2068,7 +2068,7 @@ sub picon_url {
2068
if (!$avatar_cache{$email}) {
2069
my ($user, $domain) = split('@', $email);
2070
$avatar_cache{$email} =
2071
- "http://www.cs.indiana.edu/cgi-pub/kinzler/piconsearch.cgi/" .
2071
+ "//www.cs.indiana.edu/cgi-pub/kinzler/piconsearch.cgi/" .
2072
"$domain/$user/" .
2073
"users+domains+unknown/up/single";
2074
}
@@ -2083,7 +2083,7 @@ sub gravatar_url {
2083
my $email = lc shift;
2084
my $size = shift;
2085
$avatar_cache{$email} ||=
2086
- "http://www.gravatar.com/avatar/" .
2086
+ "//www.gravatar.com/avatar/" .
2087
Digest::MD5::md5_hex($email) . "?s=";
2088
return $avatar_cache{$email} . $size;
2089
}