...
 
Commits (2)
......@@ -158,7 +158,7 @@ note: different source packages can build binaries with the same binary package
URL: /file/<hash>
http status codes: 200 500 404 403 304
http status codes: 200 500 404 451 304
[return the file]
URL: /mr/file/<hash>/info
......
......@@ -76,12 +76,12 @@ def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
# Handle Python exceptions
app = ErrorHandler(app, global_conf, **config['pylons.errorware'])
# Display error documents for 401, 403, 404 status codes (and
# Display error documents for 401, 404, 451 status codes (and
# 500 when debug is disabled)
if asbool(config['debug']):
app = StatusCodeRedirect(app)
else:
app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])
app = StatusCodeRedirect(app, [400, 401, 404, 451, 500])
# Optionally suppress all Python warnings
if not 'warnings' in config or not asbool(config['warnings']):
......
......@@ -144,7 +144,7 @@ class ArchiveController(BaseController):
raise
except IOError, error:
if (error.errno == errno.EACCES):
abort(403, "Ooops, cannot read file with digest %s. Maybe this file is not redistributable and this was done on purpose. If in doubt report this."%(digest))
abort(451, "Ooops, cannot read file with digest %s. Maybe this file is not redistributable and this was done on purpose. If in doubt report this."%(digest))
else:
raise
......