Do not check preconditions on REST parent resources
If 'If-None-Match: *' is specified this should only fail if the specified REST resource already exists and not if the parent resource exists. Change-Id: I299ff4cdcd4d932401507eaca4f5807718be6dcd Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
committed by
Edwin Kempin
parent
be0e5c698f
commit
ecbba0d5f5
@@ -215,7 +215,9 @@ public class RestApiServlet extends HttpServlet {
|
||||
IdString id = path.remove(0);
|
||||
try {
|
||||
rsrc = rc.parse(rsrc, id);
|
||||
checkPreconditions(req, rsrc);
|
||||
if (path.isEmpty()) {
|
||||
checkPreconditions(req, rsrc);
|
||||
}
|
||||
} catch (ResourceNotFoundException e) {
|
||||
if (rc instanceof AcceptsCreate
|
||||
&& path.isEmpty()
|
||||
|
||||
Reference in New Issue
Block a user