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
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user