aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Borowitz2012-06-20 17:53:59 (EDT)
committerDave Borowitz2012-06-20 17:53:59 (EDT)
commit330c3cae728d113e5d2fd62124c26edfee45c7e2 (patch)
treea32d4431f56c975c4a42166745a2a2979f366937
parentfe1f1b8f8aba60fdd1ad6f0f72e9c9180978cc60 (diff)
downloadjgit-330c3cae728d113e5d2fd62124c26edfee45c7e2.zip
jgit-330c3cae728d113e5d2fd62124c26edfee45c7e2.tar.gz
jgit-330c3cae728d113e5d2fd62124c26edfee45c7e2.tar.bz2
Serve 403 from RepositoryFilter on ServiceMayNotContinueExceptionrefs/changes/60/6460/1
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
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/RepositoryFilter.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/RepositoryFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/RepositoryFilter.java
index 5b336b2..5840402 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/RepositoryFilter.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/RepositoryFilter.java
@@ -143,7 +143,7 @@ public class RepositoryFilter implements Filter {
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 {