Return 410 Gone (rather than 500) if an output is no longer available
[?]
Feb 26, 2014, 10:38 AM
MNKXBLNCAGESRG3AUMII3F5NPPMOYKXJCKZNNAVHIBDA6Z6ZPHUACDependencies
- [2]
45A23NZPAdd an action to download a specific output of a build as a .nar.bz2 - [3]
LYVUXIGTClean up the authorization code a bit - [4]
2CZSW5S5Don't redirect to /login if authentication is required - [5]
PMNWRTGJAdd multiple output support - [6]
J5UVLXOK* Start of a basic Catalyst web interface. - [7]
SSMN5MPTRemove dead code - [8]
XE6HD7BPProvide the nix-cache-info file required by the binary cache substituter - [9]
W3HI52QVuse NIX_*_DIR env vars when defined - [10]
MT5HGXFPHydra/62 fix, broken nar download - [11]
FPK5LF53* Put the project-related actions in a separate controller. Put the - [12]
UXVDOUBJ - [13]
XHVZXX6N - [14]
XJFHFZCA* Provide some redirects to build products by type so that we can for - [15]
CS7T2XFI - [16]
MVB7RRLT* Move NARs from the NixChannel controller to the Root controller and - [17]
HXBXDEFKSpeed up channel processing - [*]
5NO7NCKT* Refactoring. - [*]
LBNVQXUB* Build the /build stuff in a separate controller.
Change contents
- replacement in src/lib/Hydra/Base/Controller/NixChannel.pm at line 87
unless (all { isValidPath($_->path) } $c->stash->{build}->buildoutputs->all) {$c->response->status(410); # "Gone"error($c, "Build " . $c->stash->{build}->id . " is no longer available.");}gone($c, "Build " . $c->stash->{build}->id . " is no longer available.")unless all { isValidPath($_->path) } $c->stash->{build}->buildoutputs->all; - replacement in src/lib/Hydra/Controller/Build.pm at line 245
error($c, "Output is not available.") unless isValidPath $output->path;gone($c, "Output is no longer available.") unless isValidPath $output->path; - replacement in src/lib/Hydra/Controller/Root.pm at line 233
if (!isValidPath($path)) {$c->response->status(410); # "Gone"error($c, "Path " . $path . " is no longer available.");}gone($c, "Path " . $path . " is no longer available.") unless isValidPath($path); - replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 18
error notFound accessDeniederror notFound gone accessDenied - edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 103
}sub gone {my ($c, $msg) = @_;error($c, $msg, 410);