Support for Source compressed download (ZIP, GZ).
In order to enable the download of compressed archives,
just add the following two lines to the file:
src/main/resources/gitblit.properties
web.allowZipDownloads = true
web.compressedDownloads = zip gz
Change-Id: I834fb50d29c7f9f54d25df338af1f0f4ae75941c
diff --git a/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitModule.java b/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitModule.java
index 2c9ce86..7df9405 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitModule.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitModule.java
@@ -43,6 +43,7 @@
serve("/pages/*").with(WrappedPagesServlet.class);
serve("/feed/*").with(WrappedSyndicationServlet.class);
+ serve("/zip/*").with(WrappedDownloadZipServlet.class);
filter("/*").through(GerritWicketFilter.class);
filter("/pages/*").through(WrappedPagesFilter.class);
diff --git a/src/main/java/com/googlesource/gerrit/plugins/gitblit/WrappedDownloadZipServlet.java b/src/main/java/com/googlesource/gerrit/plugins/gitblit/WrappedDownloadZipServlet.java
new file mode 100644
index 0000000..5e33e30
--- /dev/null
+++ b/src/main/java/com/googlesource/gerrit/plugins/gitblit/WrappedDownloadZipServlet.java
@@ -0,0 +1,15 @@
+package com.googlesource.gerrit.plugins.gitblit;
+
+import com.gitblit.DownloadZipServlet;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+@Singleton
+public class WrappedDownloadZipServlet extends DownloadZipServlet {
+ private static final long serialVersionUID = 1348780775920545752L;
+
+ @Inject
+ public WrappedDownloadZipServlet() {
+ super();
+ }
+}