summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.server
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.http.server')
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java
index b2250e3ef3..e8d809659b 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java
@@ -80,14 +80,16 @@ class AsIsFileFilter implements Filter {
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
+ HttpServletRequest req = (HttpServletRequest) request;
+ HttpServletResponse res = (HttpServletResponse) response;
try {
final Repository db = getRepository(request);
- asIs.access((HttpServletRequest) request, db);
+ asIs.access(req, db);
chain.doFilter(request, response);
} catch (ServiceNotAuthorizedException e) {
- ((HttpServletResponse) response).sendError(SC_UNAUTHORIZED);
+ res.sendError(SC_UNAUTHORIZED);
} catch (ServiceNotEnabledException e) {
- ((HttpServletResponse) response).sendError(SC_FORBIDDEN);
+ res.sendError(SC_FORBIDDEN);
}
}
}