Merge branch 'fc/completion-send-email-with-format-patch'
[gitweb.git] / gitweb / gitweb.perl
index 3d6a7053881ec7646dc28a2eba991a15ff80c634..10ed9e51a5880430f7f109ff83f950a768a7c530 100755 (executable)
@@ -54,6 +54,11 @@ sub evaluate_uri {
        # to build the base URL ourselves:
        our $path_info = decode_utf8($ENV{"PATH_INFO"});
        if ($path_info) {
+               # $path_info has already been URL-decoded by the web server, but
+               # $my_url and $my_uri have not. URL-decode them so we can properly
+               # strip $path_info.
+               $my_url = unescape($my_url);
+               $my_uri = unescape($my_uri);
                if ($my_url =~ s,\Q$path_info\E$,, &&
                    $my_uri =~ s,\Q$path_info\E$,, &&
                    defined $ENV{'SCRIPT_NAME'}) {
@@ -8023,7 +8028,7 @@ sub git_feed {
                %latest_commit = %{$commitlist[0]};
                my $latest_epoch = $latest_commit{'committer_epoch'};
                exit_if_unmodified_since($latest_epoch);
-               %latest_date = parse_date($latest_epoch, $latest_commit{'comitter_tz'});
+               %latest_date = parse_date($latest_epoch, $latest_commit{'committer_tz'});
        }
        print $cgi->header(
                -type => $content_type,