Skip to content

Commit

Permalink
Fix quarkiverse#683: FrontEnd 1.15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Sep 23, 2024
1 parent ce0b541 commit e99daf6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

Expand Down Expand Up @@ -38,7 +39,8 @@ public VertxFileDownloader(Vertx vertx) {
.setKeepAlive(true));
}

public void download(String downloadUrl, String destination, String userName, String password) throws DownloadException {
public void download(String downloadUrl, String destination, String userName, String password,
Map<String, String> httpHeaders) throws DownloadException {
System.setProperty("https.protocols", "TLSv1.2");
String fixedDownloadUrl = downloadUrl;

Expand All @@ -56,6 +58,12 @@ public void download(String downloadUrl, String destination, String userName, St
if (userName != null && password != null) {
httpRequest.basicAuthentication(userName, password);
}
if (httpHeaders != null) {
for (Map.Entry<String, String> httpHeader : httpHeaders.entrySet()) {
httpRequest.putHeader(httpHeader.getKey(), httpHeader.getValue());
}
}

final Future<HttpResponse<Void>> future = httpRequest
.expect(ResponsePredicate.SC_SUCCESS)
.as(BodyCodec.pipe(destinationFile))
Expand All @@ -73,5 +81,4 @@ public void download(String downloadUrl, String destination, String userName, St
throw new RuntimeException(e);
}
}

}
}
12 changes: 3 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,22 @@
<quarkus.version>3.12.0</quarkus.version>
<quarkus-playright.version>1.0.0</quarkus-playright.version>
<assertj.version>3.26.3</assertj.version>
<frontend-plugin.version>1.15.0</frontend-plugin.version>
<frontend-plugin.version>1.15.1</frontend-plugin.version>
</properties>

<developers>
<developer>
<name>Andy Damevin</name>
<email>ia3andy@gmail.com</email>
<organization>Red Hat</organization>
<organizationUrl>http://www.redhat.com</organizationUrl>
<organizationUrl>https://www.redhat.com</organizationUrl>
</developer>
<developer>
<name>Emil Lefkof</name>
<email>mellowaredev@gmail.com</email>
<organization>KSM Technology</organization>
<organizationUrl>https://www.ksmpartners.com/</organizationUrl>
</developer>
<developer>
<name>Shivam Sharma</name>
<email>meshivam81@gmail.com</email>
<organization>Hyperfoil</organization>
<organizationUrl>https://github.com/Hyperfoil</organizationUrl>
</developer>
</developers>

<dependencyManagement>
Expand Down Expand Up @@ -114,4 +108,4 @@
</modules>
</profile>
</profiles>
</project>
</project>

0 comments on commit e99daf6

Please sign in to comment.