summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorHolger Weiß <holger@zedat.fu-berlin.de>2009-03-31 16:16:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-04-20 10:42:23 (GMT)
commitccb4b5391382f4cdb5e5be49036e82e7d837b7af (patch)
tree25d057cb17202f1a75dd045d40c8de81b9d70029 /gitweb
parent21590d5262f71b336926a9d2cec5b04b0aa6c4a0 (diff)
downloadgit-ccb4b5391382f4cdb5e5be49036e82e7d837b7af.zip
git-ccb4b5391382f4cdb5e5be49036e82e7d837b7af.tar.gz
git-ccb4b5391382f4cdb5e5be49036e82e7d837b7af.tar.bz2
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ß <holger@zedat.fu-berlin.de> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl4
1 files changed, 2 insertions, 2 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 33ef190..3f99361 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -688,10 +688,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