diff --git a/docker-compose.yml b/docker-compose.yml index 4497dc4df..3d1213701 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.9" services: reposilite: - image: reposilite:2.9.21-SNAPSHOT + image: reposilite:2.9.22-SNAPSHOT build: context: . dockerfile: Dockerfile diff --git a/docs/docs/docker.html b/docs/docs/docker.html index 1f22e0f56..751f51669 100644 --- a/docs/docs/docker.html +++ b/docs/docs/docker.html @@ -61,7 +61,7 @@

Installation

First of all, you have to pull the image from DockerHub:

-
// released builds, e.g. 2.9.21-SNAPSHOT
+
// released builds, e.g. 2.9.22-SNAPSHOT
 $ docker pull dzikoysk/reposilite:2.9.21-SNAPSHOT
 
 // nightly builds
diff --git a/docs/docs/docker/index.html b/docs/docs/docker/index.html
index 1f22e0f56..751f51669 100644
--- a/docs/docs/docker/index.html
+++ b/docs/docs/docker/index.html
@@ -61,7 +61,7 @@
 
 

Installation

First of all, you have to pull the image from DockerHub:

-
// released builds, e.g. 2.9.21-SNAPSHOT
+
// released builds, e.g. 2.9.22-SNAPSHOT
 $ docker pull dzikoysk/reposilite:2.9.21-SNAPSHOT
 
 // nightly builds
diff --git a/pom.xml b/pom.xml
index 0852495ea..479cdfc68 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
     org.panda-lang
     reposilite-parent
     pom
-    2.9.21-SNAPSHOT
+    2.9.22-SNAPSHOT
 
     
         reposilite-backend
diff --git a/reposilite-backend/pom.xml b/reposilite-backend/pom.xml
index 48c09bbd8..02c620aa6 100644
--- a/reposilite-backend/pom.xml
+++ b/reposilite-backend/pom.xml
@@ -18,7 +18,7 @@
     
         reposilite-parent
         org.panda-lang
-        2.9.21-SNAPSHOT
+        2.9.22-SNAPSHOT
     
     4.0.0
 
diff --git a/reposilite-backend/src/main/java/org/panda_lang/reposilite/ReposiliteConstants.java b/reposilite-backend/src/main/java/org/panda_lang/reposilite/ReposiliteConstants.java
index 9b03b4f0e..bff8868a7 100644
--- a/reposilite-backend/src/main/java/org/panda_lang/reposilite/ReposiliteConstants.java
+++ b/reposilite-backend/src/main/java/org/panda_lang/reposilite/ReposiliteConstants.java
@@ -20,7 +20,7 @@ public final class ReposiliteConstants {
 
     public static final String NAME = "Reposilite";
 
-    public static final String VERSION = "2.9.21-SNAPSHOT";
+    public static final String VERSION = "2.9.22-SNAPSHOT";
 
     public static final String REMOTE_VERSION = "https://repo.panda-lang.org/org/panda-lang/reposilite/latest";
 
diff --git a/reposilite-backend/src/main/java/org/panda_lang/reposilite/error/FailureService.java b/reposilite-backend/src/main/java/org/panda_lang/reposilite/error/FailureService.java
index 8cc5170e6..105af6e2f 100644
--- a/reposilite-backend/src/main/java/org/panda_lang/reposilite/error/FailureService.java
+++ b/reposilite-backend/src/main/java/org/panda_lang/reposilite/error/FailureService.java
@@ -16,8 +16,10 @@
 
 package org.panda_lang.reposilite.error;
 
+import org.jetbrains.annotations.Nullable;
 import org.panda_lang.reposilite.Reposilite;
 import org.panda_lang.utilities.commons.ArrayUtils;
+import org.panda_lang.utilities.commons.StringUtils;
 
 import java.util.Collection;
 import java.util.Set;
@@ -32,9 +34,16 @@ public void throwException(String id, Throwable throwable) {
 
         exceptions.add(String.join(System.lineSeparator(),
                 "failure " + id,
+                throwException(throwable)
+        ).trim());
+    }
+
+    private String throwException(@Nullable Throwable throwable) {
+        return throwable == null ? StringUtils.EMPTY : String.join(System.lineSeparator(),
                 "  by " + throwable.getClass().getSimpleName() + ": " + throwable.getMessage(),
-                "  at " + ArrayUtils.get(throwable.getStackTrace(), 0).map(StackTraceElement::toString).orElseGet("")
-        ));
+                "  at " + ArrayUtils.get(throwable.getStackTrace(), 0).map(StackTraceElement::toString).orElseGet(""),
+                throwException(throwable.getCause())
+        );
     }
 
     public boolean hasFailures() {
diff --git a/reposilite-backend/src/main/java/org/panda_lang/reposilite/repository/LookupController.java b/reposilite-backend/src/main/java/org/panda_lang/reposilite/repository/LookupController.java
index 2a000500d..90b66a367 100644
--- a/reposilite-backend/src/main/java/org/panda_lang/reposilite/repository/LookupController.java
+++ b/reposilite-backend/src/main/java/org/panda_lang/reposilite/repository/LookupController.java
@@ -86,7 +86,7 @@ public LookupController(
     @Override
     public void handle(Context ctx) {
         ReposiliteContext context = contextFactory.create(ctx);
-        Reposilite.getLogger().info("LOOKUP " + context.uri() + " from " + context.address());
+        Reposilite.getLogger().debug("LOOKUP " + context.uri() + " from " + context.address());
 
         Result response = lookupService.findLocal(context);
 
diff --git a/reposilite-backend/src/main/java/org/panda_lang/reposilite/repository/LookupService.java b/reposilite-backend/src/main/java/org/panda_lang/reposilite/repository/LookupService.java
index 3d31a2154..f7632bae6 100644
--- a/reposilite-backend/src/main/java/org/panda_lang/reposilite/repository/LookupService.java
+++ b/reposilite-backend/src/main/java/org/panda_lang/reposilite/repository/LookupService.java
@@ -133,7 +133,7 @@ Result findLocal(ReposiliteContext context) {
             context.result(outputStream -> FileUtils.copyFile(file, outputStream));
         }
 
-        Reposilite.getLogger().info("RESOLVED " + file.getPath() + "; mime: " + fileDetails.getContentType() + "; size: " + file.length());
+        Reposilite.getLogger().debug("RESOLVED " + file.getPath() + "; mime: " + fileDetails.getContentType() + "; size: " + file.length());
         return Result.ok(new LookupResponse(fileDetails));
     }
 
diff --git a/reposilite-backend/src/main/java/org/panda_lang/reposilite/repository/ProxyService.java b/reposilite-backend/src/main/java/org/panda_lang/reposilite/repository/ProxyService.java
index d959b23fa..1a8af205f 100644
--- a/reposilite-backend/src/main/java/org/panda_lang/reposilite/repository/ProxyService.java
+++ b/reposilite-backend/src/main/java/org/panda_lang/reposilite/repository/ProxyService.java
@@ -17,6 +17,7 @@
 package org.panda_lang.reposilite.repository;
 
 import com.google.api.client.http.GenericUrl;
+import com.google.api.client.http.HttpHeaders;
 import com.google.api.client.http.HttpRequest;
 import com.google.api.client.http.HttpRequestFactory;
 import com.google.api.client.http.HttpResponse;
@@ -109,7 +110,13 @@ protected Result>, ErrorDto>
                         continue;
                     }
 
-                    long contentLength = Option.of(remoteResponse.getHeaders().getContentLength()).orElseGet(0L);
+                    HttpHeaders headers = remoteResponse.getHeaders();
+
+                    if ("text/html".equals(headers.getContentType())) {
+                        continue;
+                    }
+
+                    long contentLength = Option.of(headers.getContentLength()).orElseGet(0L);
                     String[] path = remoteUri.split("/");
 
                     FileDetailsDto fileDetails = new FileDetailsDto(FileDetailsDto.FILE, ArrayUtils.getLast(path), "", remoteResponse.getContentType(), contentLength);
diff --git a/reposilite-packages/reposilite-helm/Chart.yaml b/reposilite-packages/reposilite-helm/Chart.yaml
index d3a73b16d..234dc4327 100644
--- a/reposilite-packages/reposilite-helm/Chart.yaml
+++ b/reposilite-packages/reposilite-helm/Chart.yaml
@@ -15,10 +15,10 @@ type: application
 # This is the chart version. This version number should be incremented each time you make changes
 # to the chart and its templates, including the app version.
 # Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 2.9.21-SNAPSHOT
+version: 2.9.22-SNAPSHOT
 
 # This is the version number of the application being deployed. This version number should be
 # incremented each time you make changes to the application. Versions are not expected to
 # follow Semantic Versioning. They should reflect the version the application is using.
 # It is recommended to use it with quotes.
-appVersion: "2.9.21-SNAPSHOT"
+appVersion: "2.9.22-SNAPSHOT"
diff --git a/reposilite-site/docs/docker.md b/reposilite-site/docs/docker.md
index 15778d20f..cb2b28ac3 100644
--- a/reposilite-site/docs/docker.md
+++ b/reposilite-site/docs/docker.md
@@ -13,8 +13,8 @@ Reposilite defines two types of builds:
 First of all, you have to pull the image from [DockerHub](https://hub.docker.com/r/dzikoysk/reposilite):
 
 ```shell-session
-// released builds, e.g. 2.9.21-SNAPSHOT
-$ docker pull dzikoysk/reposilite:2.9.21-SNAPSHOT
+// released builds, e.g. 2.9.22-SNAPSHOT
+$ docker pull dzikoysk/reposilite:2.9.22-SNAPSHOT
 
 // nightly builds
 $ docker pull dzikoysk/reposilite:nightly