summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-31 22:09:53 -0700
committerJunio C Hamano <gitster@pobox.com>2009-08-31 22:09:53 -0700
commit909beb860b98d51eeb26ff1f97bfad40ef7d5970 (patch)
treefeddc0439f485266049de3e45b661e9e5e311fd8 /gitweb
parentd34eca0392ef1da769788b60402d9a57dbc8c1c9 (diff)
parente39e0d375d1d84fc1fff14b58c729fbd289cdd01 (diff)
downloadgit-909beb860b98d51eeb26ff1f97bfad40ef7d5970.tar.gz
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) {