Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/common.py @ 37693:31a0d47d69b3
lfs: update the HTTP status codes in error cases
I'm not bothering with validating PUT requests (for now), because the spec
doesn't explicitly call out a Content-Type (though the example transcript does
use the sensible 'application/octet-stream').
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 13 Apr 2018 16:32:33 -0400 |
parents | cc0a6ea95d98 |
children | a1110db1e455 |
comparison
equal
deleted
inserted
replaced
37692:10e5bb9678f4 | 37693:31a0d47d69b3 |
---|---|
28 HTTP_BAD_REQUEST = 400 | 28 HTTP_BAD_REQUEST = 400 |
29 HTTP_UNAUTHORIZED = 401 | 29 HTTP_UNAUTHORIZED = 401 |
30 HTTP_FORBIDDEN = 403 | 30 HTTP_FORBIDDEN = 403 |
31 HTTP_NOT_FOUND = 404 | 31 HTTP_NOT_FOUND = 404 |
32 HTTP_METHOD_NOT_ALLOWED = 405 | 32 HTTP_METHOD_NOT_ALLOWED = 405 |
33 HTTP_NOT_ACCEPTABLE = 406 | |
34 HTTP_UNSUPPORTED_MEDIA_TYPE = 415 | |
33 HTTP_SERVER_ERROR = 500 | 35 HTTP_SERVER_ERROR = 500 |
34 | 36 |
35 | 37 |
36 def ismember(ui, username, userlist): | 38 def ismember(ui, username, userlist): |
37 """Check if username is a member of userlist. | 39 """Check if username is a member of userlist. |