Skip to content

Commit ccb4b53

Browse files
weissgitster
authored andcommitted
gitweb: Fix snapshots requested via PATH_INFO
Fix the detection of the requested snapshot format, which failed for PATH_INFO URLs since the references to the hashes which describe the supported snapshot formats weren't dereferenced appropriately. Signed-off-by: Holger Weiß <[email protected]> Acked-by: Jakub Narebski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 21590d5 commit ccb4b53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitweb/gitweb.perl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,10 +688,10 @@ sub evaluate_path_info {
688688
# extensions. Allowed extensions are both the defined suffix
689689
# (which includes the initial dot already) and the snapshot
690690
# format key itself, with a prepended dot
691-
while (my ($fmt, %opt) = each %known_snapshot_formats) {
691+
while (my ($fmt, $opt) = each %known_snapshot_formats) {
692692
my $hash = $refname;
693693
my $sfx;
694-
$hash =~ s/(\Q$opt{'suffix'}\E|\Q.$fmt\E)$//;
694+
$hash =~ s/(\Q$opt->{'suffix'}\E|\Q.$fmt\E)$//;
695695
next unless $sfx = $1;
696696
# a valid suffix was found, so set the snapshot format
697697
# and reset the hash parameter

0 commit comments

Comments
 (0)