Skip to content

Commit

Permalink
0003756: Change authentication failed from 403 to 659
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Oct 12, 2018
1 parent 9ea369d commit ed8d263
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Expand Up @@ -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();
Expand Down
Expand Up @@ -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();
Expand Down
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit ed8d263

Please sign in to comment.