On 07/07/2016 12:41 PM, Søren Løvborg wrote:
2) "Kill _method and change the URLs"

Remove _method overrides completely (and good riddance) by changing PUT/DELETE routes to POST and adjusting URLs as needed to avoid ambiguity.

https://bitbucket.org/Unity-Technologies/kallithea/commits/0a71c69001b2b54e24a9bc1bc89b2fe0f1ea9898

As can be seen, there's a lot of work down this road; the above changeset fixes 2 out of 40 PUT/DELETE routes.

The work is however mainly about deleting code. The old code has some redundancy in having to specify put/delete both in the referenced routing entry and when using the URL.

The main risk is probably that the redundancy do that we in some places use a POST url for DELETE - we will have to check that carefully.

I suggest this option - as a separate refactoring that can land soon. It will be easier to review if each of the 40 changes you mention are in separate changesets ... but that might be a bit overkill ...

This also changes a number of URLs, it might be worthwhile to consider where we want to go with Kallithea's URLs before embarking on this, since there are numerous other problems in this area; the Kallithea URLs are often ambiguous in regards to repository paths, and we really need to fix that too. (Never name a repository "changelog", or "1", for that matter...)

This will probably not change any user visible URLs so I think we freely can change these both now and later.

(One related thing to consider is that we have some places where we make a POST that returns a html page. In such cases it is nice if there is a corresponding GET handler for returning the same page. But again: The refactoring discussed here will not change any existing POST handlers - only add new ones.)

/Mads
_______________________________________________
kallithea-general mailing list
kallithea-general@sfconservancy.org
http://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to