summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-08-31 22:09:53 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-08-31 22:09:53 -0700
commit909beb860b98d51eeb26ff1f97bfad40ef7d5970 (patch)
treefeddc0439f485266049de3e45b661e9e5e311fd8 /gitweb
parentMerge branch 'tf/diff-whitespace-incomplete-line' (diff)
parentgitweb: add t9501 tests for checking HTTP status codes (diff)
downloadtgif-909beb860b98d51eeb26ff1f97bfad40ef7d5970.tar.xz
Merge branch 'mr/gitweb-snapshot'
* mr/gitweb-snapshot: gitweb: add t9501 tests for checking HTTP status codes gitweb: split test suite into library and tests gitweb: improve snapshot error handling
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 ff2d42abb9..24b219310a 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -5190,10 +5190,10 @@ sub git_snapshot {
die_error(400, "Invalid snapshot format parameter");
} elsif (!exists($known_snapshot_formats{$format})) {
die_error(400, "Unknown snapshot format");
- } elsif (!grep($_ eq $format, @snapshot_fmts)) {
- die_error(403, "Unsupported snapshot format");
} elsif ($known_snapshot_formats{$format}{'disabled'}) {
die_error(403, "Snapshot format not allowed");
+ } elsif (!grep($_ eq $format, @snapshot_fmts)) {
+ die_error(403, "Unsupported snapshot format");
}
if (!defined $hash) {