}
initialized = true;
if (uploadPackFactory != UploadPackFactory.DISABLED) {
ServletBinder b = serve("*/" + GitSmartHttpTools.UPLOAD_PACK);
b = b.through(new UploadPackServlet.Factory(uploadPackFactory));
for (Filter f : uploadPackFilters)
b = b.through(f);
b.with(new UploadPackServlet());
}
if (receivePackFactory != ReceivePackFactory.DISABLED) {
ServletBinder b = serve("*/" + GitSmartHttpTools.RECEIVE_PACK);
b = b.through(new ReceivePackServlet.Factory(receivePackFactory));
for (Filter f : receivePackFilters)
b = b.through(f);
b.with(new ReceivePackServlet());
}
ServletBinder refs = serve("*/" + Constants.INFO_REFS);
if (uploadPackFactory != UploadPackFactory.DISABLED) {
refs = refs.through(new UploadPackServlet.InfoRefs(
uploadPackFactory, uploadPackFilters));
}
if (receivePackFactory != ReceivePackFactory.DISABLED) {
refs = refs.through(new ReceivePackServlet.InfoRefs(
receivePackFactory, receivePackFilters));
}
if (asIs != AsIsFileService.DISABLED) {
refs = refs.through(new IsLocalFilter());
refs = refs.through(new AsIsFileFilter(asIs));
refs.with(new InfoRefsServlet());
} else
refs.with(new ErrorServlet(HttpServletResponse.SC_NOT_ACCEPTABLE));
if (asIs != AsIsFileService.DISABLED) {
final IsLocalFilter mustBeLocal = new IsLocalFilter();
final AsIsFileFilter enabled = new AsIsFileFilter(asIs);