summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-09-01 05:09:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-09-01 05:09:53 (GMT)
commit909beb860b98d51eeb26ff1f97bfad40ef7d5970 (patch)
treefeddc0439f485266049de3e45b661e9e5e311fd8 /gitweb/gitweb.perl
parentd34eca0392ef1da769788b60402d9a57dbc8c1c9 (diff)
parente39e0d375d1d84fc1fff14b58c729fbd289cdd01 (diff)
downloadgit-909beb860b98d51eeb26ff1f97bfad40ef7d5970.zip
git-909beb860b98d51eeb26ff1f97bfad40ef7d5970.tar.gz
git-909beb860b98d51eeb26ff1f97bfad40ef7d5970.tar.bz2
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/gitweb.perl')
-rwxr-xr-xgitweb/gitweb.perl4
1 files changed, 2 insertions, 2 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index ff2d42a..24b2193 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) {