##// END OF EJS Templates
lfs: ensure the transfer request is for a known URI...
Matt Harbison -
r37267:9640ccf4 default
parent child Browse files
Show More
@@ -22,6 +22,7 b' from mercurial import ('
22 HTTP_OK = hgwebcommon.HTTP_OK
22 HTTP_OK = hgwebcommon.HTTP_OK
23 HTTP_CREATED = hgwebcommon.HTTP_CREATED
23 HTTP_CREATED = hgwebcommon.HTTP_CREATED
24 HTTP_BAD_REQUEST = hgwebcommon.HTTP_BAD_REQUEST
24 HTTP_BAD_REQUEST = hgwebcommon.HTTP_BAD_REQUEST
25 HTTP_NOT_FOUND = hgwebcommon.HTTP_NOT_FOUND
25
26
26 def handlewsgirequest(orig, rctx, req, res, checkperm):
27 def handlewsgirequest(orig, rctx, req, res, checkperm):
27 """Wrap wireprotoserver.handlewsgirequest() to possibly process an LFS
28 """Wrap wireprotoserver.handlewsgirequest() to possibly process an LFS
@@ -244,6 +245,10 b' def _processbasictransfer(repo, req, res'
244 oid = req.dispatchparts[-1]
245 oid = req.dispatchparts[-1]
245 localstore = repo.svfs.lfslocalblobstore
246 localstore = repo.svfs.lfslocalblobstore
246
247
248 if len(req.dispatchparts) != 4:
249 _sethttperror(res, HTTP_NOT_FOUND)
250 return True
251
247 if method == b'PUT':
252 if method == b'PUT':
248 checkperm('upload')
253 checkperm('upload')
249
254
General Comments 0
You need to be logged in to leave comments. Login now