Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Bump `org.ajoberstar.grgit:grgit-gradle` from 5.3.2 to 5.3.3 ([#1723](https://github.com/opensearch-project/opensearch-java/pull/1723))
- Bump `org.apache.httpcomponents.core5:httpcore5` from 5.3.4 to 5.4 ([#1726](https://github.com/opensearch-project/opensearch-java/pull/1726), [#1733](https://github.com/opensearch-project/opensearch-java/pull/1733), [#1815](https://github.com/opensearch-project/opensearch-java/pull/1815))
- Bump `org.owasp.dependencycheck` from 12.1.3 to 12.1.9 ([#1735](https://github.com/opensearch-project/opensearch-java/pull/1735), [#1742](https://github.com/opensearch-project/opensearch-java/pull/1742), [#1754](https://github.com/opensearch-project/opensearch-java/pull/1754), [#1765](https://github.com/opensearch-project/opensearch-java/pull/1765), [#1796](https://github.com/opensearch-project/opensearch-java/pull/1796))
- Bump `org.apache.httpcomponents.client5:httpclient5` from 5.5 to 5.5.1 ([#1740](https://github.com/opensearch-project/opensearch-java/pull/1740))
- Bump `org.apache.httpcomponents.client5:httpclient5` from 5.5 to 5.6 ([#1740](https://github.com/opensearch-project/opensearch-java/pull/1740), [#1844](https://github.com/opensearch-project/opensearch-java/pull/1844))
- Bump `com.github.jk1.dependency-license-report` from 2.9 to 3.0.1 ([#1779](https://github.com/opensearch-project/opensearch-java/pull/1779), [#1781](https://github.com/opensearch-project/opensearch-java/pull/1781))

### Added
Expand Down
18 changes: 8 additions & 10 deletions java-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ val integrationTest = task<Test>("integrationTest") {
System.getProperty("tests.awsSdk2support.domainRegion", "us-east-1"))
}

val opensearchVersion = "3.0.0-SNAPSHOT"
val opensearchVersion = "3.5.0-SNAPSHOT"

dependencies {
val jacksonVersion = "2.18.3"
val jacksonDatabindVersion = "2.18.3"
val jacksonVersion = "2.20.1"
val jacksonDatabindVersion = "2.20.1"

// Apache 2.0
api("commons-logging:commons-logging:1.3.5")
Expand All @@ -191,7 +191,7 @@ dependencies {
}
testImplementation("org.opensearch.client", "opensearch-rest-client", opensearchVersion)

api("org.apache.httpcomponents.client5:httpclient5:5.5.1") {
api("org.apache.httpcomponents.client5:httpclient5:5.6") {
exclude(group = "org.apache.httpcomponents.core5")
}
api("org.apache.httpcomponents.core5:httpcore5:5.4")
Expand Down Expand Up @@ -250,6 +250,10 @@ dependencies {
testImplementation("junit", "junit" , "4.13.2") {
exclude(group = "org.hamcrest")
}

// The Bouncy Castle License (MIT): https://www.bouncycastle.org/licence.html
testImplementation("org.bouncycastle", "bcprov-lts8on", "2.73.6")
testImplementation("org.bouncycastle", "bcpkix-lts8on", "2.73.6")
}

licenseReport {
Expand Down Expand Up @@ -399,10 +403,4 @@ if (runtimeJavaVersion >= JavaVersion.VERSION_21) {
testClassesDirs += java21.output.classesDirs
classpath = sourceSets["java21"].runtimeClasspath
}
} else {
dependencies {
// The Bouncy Castle License (MIT): https://www.bouncycastle.org/licence.html
testImplementation("org.bouncycastle", "bcprov-lts8on", "2.73.6")
testImplementation("org.bouncycastle", "bcpkix-lts8on", "2.73.6")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
import org.apache.hc.client5.http.auth.CredentialsProvider;
import org.apache.hc.client5.http.classic.methods.HttpHead;
import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase;
import org.apache.hc.client5.http.entity.GzipDecompressingEntity;
import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
import org.apache.hc.client5.http.impl.auth.BasicAuthCache;
import org.apache.hc.client5.http.impl.auth.BasicScheme;
Expand Down Expand Up @@ -304,12 +303,6 @@ private ResponseOrResponseException convertResponse(
) throws IOException {
int statusCode = httpResponse.getCode();

Optional.ofNullable(httpResponse.getEntity())
.map(HttpEntity::getContentEncoding)
.filter("gzip"::equalsIgnoreCase)
.map(gzipHeaderValue -> new GzipDecompressingEntity(httpResponse.getEntity()))
.ifPresent(httpResponse::setEntity);

Response response = new Response(new RequestLine(request), node.getHost(), httpResponse);
Set<Integer> ignoreErrorCodes = getIgnoreErrorCodes("400,401,403,404,405", request.getMethod());
if (isSuccessfulResponse(statusCode) || ignoreErrorCodes.contains(response.getStatusLine().getStatusCode())) {
Expand Down
Loading