[PATCH 3 of 6] lfs: add basic routing for the server side wire protocol processing

Yuya Nishihara yuya at tcha.org
Thu Mar 29 09:15:26 EDT 2018


On Thu, 29 Mar 2018 09:10:46 -0400, Matt Harbison wrote:
> > On Mar 29, 2018, at 8:13 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> >> +    if op == 'upload':
> >> +        if req.method != 'PUT':
> >> +            msg = 'upload requires PUT request'
> >> +            raise ErrorResponse(HTTP_METHOD_NOT_ALLOWED, msg)
> >>     # enforce that you can only push using POST requests
> >> -    if req.method != 'POST':
> >> +    elif req.method != 'POST':
> > 
> > Can you add basic tests for this, as a followup?
> 
> Any thoughts on how?  This is the second stage, although I guess we can just jump to a non-PUT to the second stage URI.  Is there an existing tool to do this?

If Python httplib can't do PUT (no idea if that's true or not), maybe
we can use curl. It's pretty standard tool.


More information about the Mercurial-devel mailing list