Use IF_NONE_MATCH constants for If-None-Match

Change-Id: I3cd3cd0d4fdc6ba96f3bfbb96485f5a74d716d3b
This commit is contained in:
Shawn Pearce 2015-07-16 15:20:37 -07:00
parent b2e2c35101
commit 2e42f076a0

View File

@ -476,7 +476,7 @@ public class RestApiServlet extends HttpServlet {
private void checkPreconditions(HttpServletRequest req)
throws PreconditionFailedException {
if ("*".equals(req.getHeader("If-None-Match"))) {
if ("*".equals(req.getHeader(HttpHeaders.IF_NONE_MATCH))) {
throw new PreconditionFailedException("Resource already exists");
}
}