public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException { super.doFilter(req, resp, chain); }
public void init(FilterConfig config) throws ServletException { ConfigRepository configRepository = ContextLoader.getCurrentWebApplicationContext().getBean(ConfigRepository.class); FileResolver<HttpServletRequest> resolver = new FileResolver<>(); resolver.exportRepository("api/config-repository.git", configRepository.getGitRepo()); setRepositoryResolver(resolver); setReceivePackFactory(null); super.init(config); }
/** * New servlet that will load its base directory from {@code web.xml}. * <p> * The required parameter {@code base-path} must be configured to point to * the local filesystem directory where all served Git repositories reside. */ public GitServlet() { super(new GitFilter()); gitFilter = (GitFilter) getDelegateFilter(); }
public void doGet(final HttpServletRequest req, final HttpServletResponse rsp) throws IOException { sendPlainText(packList(req), req, rsp); }
private void log(Repository git, Throwable e) { getServletContext().log(MessageFormat.format( HttpServerText.get().internalErrorDuringUploadPack, ServletUtils.identify(git)), e); } }
@Override protected void doHead(final HttpServletRequest req, final HttpServletResponse rsp) throws ServletException, IOException { serve(req, rsp, false); }
@Override String etag(final FileSender sender) throws IOException { return sender.getTailChecksum(); } }
/** * @param f * the filter to validate direct access to repository files * through a dumb client. If {@code null} then dumb client * support is completely disabled. */ public void setAsIsFileService(AsIsFileService f) { assertNotInitialized(); this.asIs = f != null ? f : AsIsFileService.DISABLED; }
/** * @param f * the filter to validate direct access to repository files * through a dumb client. If {@code null} then dumb client * support is completely disabled. */ public void setAsIsFileService(AsIsFileService f) { gitFilter.setAsIsFileService(f); }
/** * New servlet configured with a specific resolver. * * @param resolver * the resolver to use when matching URL to Git repository. If * null the {@code base-path} parameter will be looked for in the * parameter table during init, which usually comes from the * {@code web.xml} file of the web application. */ public void setRepositoryResolver(RepositoryResolver<HttpServletRequest> resolver) { gitFilter.setRepositoryResolver(resolver); }
/** * @param f * the factory to construct and configure an {@link UploadPack} * session when a fetch or clone is requested by a client. */ public void setUploadPackFactory(UploadPackFactory<HttpServletRequest> f) { gitFilter.setUploadPackFactory(f); }
/** * @param filter * filter to apply before any of the UploadPack operations. The * UploadPack instance is available in the request attribute * {@link ServletUtils#ATTRIBUTE_HANDLER}. */ public void addUploadPackFilter(Filter filter) { gitFilter.addUploadPackFilter(filter); }
@Override public void flush() throws IOException { doFlush(); } };
/** * New servlet that will load its base directory from {@code web.xml}. * <p> * The required parameter {@code base-path} must be configured to point to * the local filesystem directory where all served Git repositories reside. */ public GitServlet() { super(new GitFilter()); gitFilter = (GitFilter) getDelegateFilter(); }
public void doGet(final HttpServletRequest req, final HttpServletResponse rsp) throws IOException { sendPlainText(packList(req), req, rsp); }
@Override public void doGet(final HttpServletRequest req, final HttpServletResponse rsp) throws IOException { serve(req, rsp, true); }
@Override String etag(final FileSender sender) throws IOException { return sender.getTailChecksum(); } }
/** * @param f * the filter to validate direct access to repository files * through a dumb client. If {@code null} then dumb client * support is completely disabled. */ public void setAsIsFileService(AsIsFileService f) { assertNotInitialized(); this.asIs = f != null ? f : AsIsFileService.DISABLED; }
/** * @param f * the filter to validate direct access to repository files * through a dumb client. If {@code null} then dumb client * support is completely disabled. */ public void setAsIsFileService(AsIsFileService f) { gitFilter.setAsIsFileService(f); }
@Override public void doGet(final HttpServletRequest req, final HttpServletResponse rsp) throws IOException { serve(req, rsp, true); }