Use IF_NONE_MATCH constants for If-None-Match
Change-Id: I3cd3cd0d4fdc6ba96f3bfbb96485f5a74d716d3b
This commit is contained in:
@@ -476,7 +476,7 @@ public class RestApiServlet extends HttpServlet {
|
|||||||
|
|
||||||
private void checkPreconditions(HttpServletRequest req)
|
private void checkPreconditions(HttpServletRequest req)
|
||||||
throws PreconditionFailedException {
|
throws PreconditionFailedException {
|
||||||
if ("*".equals(req.getHeader("If-None-Match"))) {
|
if ("*".equals(req.getHeader(HttpHeaders.IF_NONE_MATCH))) {
|
||||||
throw new PreconditionFailedException("Resource already exists");
|
throw new PreconditionFailedException("Resource already exists");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user