Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Serve 403 from RepositoryFilter on ServiceMayNotContinueException

This has no effect on Git clients, but for browsers, 403 Forbidden may
be more appropriate. 500 Internal Server Error implies that there is
a problem with the server, whereas ServiceMayNotContinueException is
specifically intended to cover cases where the server is functioning
correctly but has determined that the request may not proceed.

Change-Id: I825abd2a029d372060103655eabf488a0547c1e8
  • Loading branch information...
commit 330c3cae728d113e5d2fd62124c26edfee45c7e2 1 parent fe1f1b8
@dborowitz dborowitz authored
View
2  org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/RepositoryFilter.java
@@ -143,7 +143,7 @@ public void doFilter(final ServletRequest request,
res.sendError(SC_UNAUTHORIZED);
return;
} catch (ServiceMayNotContinueException e) {
- sendError(req, res, SC_INTERNAL_SERVER_ERROR, e.getMessage());
+ sendError(req, res, SC_FORBIDDEN, e.getMessage());
return;
}
try {
Please sign in to comment.
Something went wrong with that request. Please try again.