Fix using HTTP methods other than GET from plugins
Commit3bde74c279
introduced a bug in the REST API. Methods other than GET could not be used anymore from plugins. For example it was not possible anymore to delete projects with the delete-plugin using DELETE. Bug: issue 2949 Change-Id: If90247ec4e0dad03b02d0a9e21202455fece90a7 Signed-off-by: Stefan Lay <stefan.lay@sap.com> (cherry picked from commit3d227bbadf
)
This commit is contained in:
parent
23e841476e
commit
036df27ba0
@ -821,8 +821,7 @@ public class RestApiServlet extends HttpServlet {
|
||||
if (core != null) {
|
||||
return new ViewData(null, core);
|
||||
} else {
|
||||
name = "GET." + p.get(0);
|
||||
core = views.get("gerrit", name);
|
||||
core = views.get("gerrit", "GET." + p.get(0));
|
||||
if (core instanceof AcceptsPost && "POST".equals(method)) {
|
||||
@SuppressWarnings("unchecked")
|
||||
AcceptsPost<RestResource> ap = (AcceptsPost<RestResource>) core;
|
||||
|
Loading…
Reference in New Issue
Block a user