diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-08-31 22:09:53 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-08-31 22:09:53 -0700 |
commit | 909beb860b98d51eeb26ff1f97bfad40ef7d5970 (patch) | |
tree | feddc0439f485266049de3e45b661e9e5e311fd8 /gitweb | |
parent | d34eca0392ef1da769788b60402d9a57dbc8c1c9 (diff) | |
parent | e39e0d375d1d84fc1fff14b58c729fbd289cdd01 (diff) | |
download | git-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-x | gitweb/gitweb.perl | 4 |
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) { |