{"thread":{"id":"18666","subject":"[PATCH] gitweb: Fix snapshots requested via PATH_INFO","startedAt":"2009-03-31T16:16:36Z","lastAt":"2009-03-31T16:16:36Z","messageCount":1,"participants":["Holger Weiß"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"110032","messageId":"20090331161636.GV30233737@CIS.FU-Berlin.DE","threadId":"18666","inReplyTo":null,"subject":"[PATCH] gitweb: Fix snapshots requested via PATH_INFO","fromName":"Holger Weiß","fromEmail":"holger@zedat.fu-berlin.de","sentAt":"2009-03-31T16:16:36Z","receivedAt":"2009-03-31T16:16:36Z","isPatch":true,"sender":{"key":"holger@zedat.fu-berlin.de","avatar":"https://avatars.githubusercontent.com/u/71850?v=4"},"body":"Fix the detection of the requested snapshot format, which failed for\nPATH_INFO URLs since the references to the hashes which describe the\nsupported snapshot formats weren't dereferenced appropriately.\n\nSigned-off-by: Holger Weiß <holger@zedat.fu-berlin.de>\n---\n gitweb/gitweb.perl |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 33ef190..3f99361 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -688,10 +688,10 @@ sub evaluate_path_info {\n \t\t# extensions. Allowed extensions are both the defined suffix\n \t\t# (which includes the initial dot already) and the snapshot\n \t\t# format key itself, with a prepended dot\n-\t\twhile (my ($fmt, %opt) = each %known_snapshot_formats) {\n+\t\twhile (my ($fmt, $opt) = each %known_snapshot_formats) {\n \t\t\tmy $hash = $refname;\n \t\t\tmy $sfx;\n-\t\t\t$hash =~ s/(\\Q$opt{'suffix'}\\E|\\Q.$fmt\\E)$//;\n+\t\t\t$hash =~ s/(\\Q$opt->{'suffix'}\\E|\\Q.$fmt\\E)$//;\n \t\t\tnext unless $sfx = $1;\n \t\t\t# a valid suffix was found, so set the snapshot format\n \t\t\t# and reset the hash parameter\n-- \n1.6.2.1\n"}]}