comparison mercurial/hgweb/common.py @ 7029:b84d27386285

hgweb: Respond with HTTP 403 for disabled archive types instead of 404 This makes it easier for clients/users to distinct between supported but disabled and unsupported archive types.
author Rocco Rutte <pdmef@gmx.net>
date Fri, 05 Sep 2008 17:28:37 +0200
parents 57b954d8d003
children 125c8fedcbe0
comparison
equal deleted inserted replaced
7028:93746cbf15b5 7029:b84d27386285
9 import errno, mimetypes, os 9 import errno, mimetypes, os
10 10
11 HTTP_OK = 200 11 HTTP_OK = 200
12 HTTP_BAD_REQUEST = 400 12 HTTP_BAD_REQUEST = 400
13 HTTP_UNAUTHORIZED = 401 13 HTTP_UNAUTHORIZED = 401
14 HTTP_FORBIDDEN = 403
14 HTTP_NOT_FOUND = 404 15 HTTP_NOT_FOUND = 404
15 HTTP_METHOD_NOT_ALLOWED = 405 16 HTTP_METHOD_NOT_ALLOWED = 405
16 HTTP_SERVER_ERROR = 500 17 HTTP_SERVER_ERROR = 500
17 18
18 class ErrorResponse(Exception): 19 class ErrorResponse(Exception):