Skip to content
Permalink
Browse files

0003756: Change authentication failed from 403 to 659

  • Loading branch information...
erilong committed Oct 12, 2018
1 parent 9ea369d commit ed8d2638d8ad5de53adcd3f4e8dcba7f6c996577
@@ -112,9 +112,7 @@ public InputStream openStream() throws IOException {
throw new ConnectionRejectedException();
case WebConstants.SC_SERVICE_UNAVAILABLE:
throw new ServiceUnavailableException();
// TODO: In 3.10, let's switch from 403 to 659
case WebConstants.SC_FORBIDDEN:
case 403:
throw new AuthenticationException();
case WebConstants.SC_NO_CONTENT:
throw new NoContentException();
@@ -290,8 +290,7 @@ private void analyzeResponseCode(int code) throws IOException {
throw new ConnectionRejectedException();
} else if (WebConstants.SC_SERVICE_UNAVAILABLE == code) {
throw new ServiceUnavailableException();
} else if (WebConstants.SC_FORBIDDEN == code || code == 403) {
// TODO: In 3.10, let's switch from 403 to 659
} else if (WebConstants.SC_FORBIDDEN == code) {
throw new AuthenticationException();
} else if (WebConstants.SYNC_DISABLED == code) {
throw new SyncDisabledException();
@@ -70,7 +70,7 @@ public boolean before(HttpServletRequest req, HttpServletResponse resp) throws I
return false;
} else {
log.warn("Node '{}' failed to authenticate. It had the wrong password", nodeId);
ServletUtils.sendError(resp, HttpServletResponse.SC_FORBIDDEN);
ServletUtils.sendError(resp, WebConstants.SC_FORBIDDEN);
return false;
}
}

0 comments on commit ed8d263

Please sign in to comment.
You can’t perform that action at this time.