]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Fix snapshots requested via PATH_INFO
authorHolger Weiß <redacted>
Tue, 31 Mar 2009 16:16:36 +0000 (18:16 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:38 +0000 (00:50 -0400)
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ß <redacted>
Acked-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index b1c9cdf832f0b63b75f5a5f5301cd68a4d45f4458d05fa88738da6724f6aed63..1bbe41c250f1f1e02b922e11a367cc7caf60b021788e6d8fda26ba0880659bb1 100755 (executable)
@@ -689,10 +689,10 @@ sub evaluate_path_info {
                # extensions. Allowed extensions are both the defined suffix
                # (which includes the initial dot already) and the snapshot
                # format key itself, with a prepended dot
-               while (my ($fmt, %opt) = each %known_snapshot_formats) {
+               while (my ($fmt, $opt) = each %known_snapshot_formats) {
                        my $hash = $refname;
                        my $sfx;
-                       $hash =~ s/(\Q$opt{'suffix'}\E|\Q.$fmt\E)$//;
+                       $hash =~ s/(\Q$opt->{'suffix'}\E|\Q.$fmt\E)$//;
                        next unless $sfx = $1;
                        # a valid suffix was found, so set the snapshot format
                        # and reset the hash parameter
This page took 0.290902 seconds and 4 git commands to generate.