Skip to content

Commit

Permalink
Update okhttp to 4.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo authored and kokosing committed Apr 5, 2023
1 parent 07b1c87 commit 4be1401
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import java.util.OptionalLong;

import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.net.HttpHeaders.LOCATION;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;

Expand Down Expand Up @@ -113,15 +112,6 @@ public String toString()
public static <T> JsonResponse<T> execute(JsonCodec<T> codec, OkHttpClient client, Request request, OptionalLong materializedJsonSizeLimit)
{
try (Response response = client.newCall(request).execute()) {
// TODO: fix in OkHttp: https://github.com/square/okhttp/issues/3111
if ((response.code() == 307) || (response.code() == 308)) {
String location = response.header(LOCATION);
if (location != null) {
request = request.newBuilder().url(location).build();
return execute(codec, client, request, materializedJsonSizeLimit);
}
}

ResponseBody responseBody = requireNonNull(response.body());
if (isJson(responseBody.contentType())) {
String body = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ public void testAuthentication()

Request authenticated = authenticator.authenticate(null, getUnauthorizedResponse("Bearer x_token_server=\"http://token.uri\""));

assertThat(authenticated.headers())
.extracting(headers -> headers.get(AUTHORIZATION))
assertThat(authenticated.headers().get(AUTHORIZATION))
.isEqualTo("Bearer valid-token");
}

Expand Down
3 changes: 1 addition & 2 deletions plugin/trino-http-event-listener/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@

<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>1.17.2</version>
<artifactId>okio-jvm</artifactId>
<scope>test</scope>
</dependency>

Expand Down
12 changes: 6 additions & 6 deletions plugin/trino-pinot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,12 @@
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<scope>runtime</scope>
</dependency>

<!-- Trino SPI -->
<dependency>
<groupId>io.trino</groupId>
Expand Down Expand Up @@ -628,12 +634,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>kafka</artifactId>
Expand Down
33 changes: 5 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
<dep.arrow.version>9.0.0</dep.arrow.version>
<dep.packaging.version>${dep.airlift.version}</dep.packaging.version>
<dep.aws-sdk.version>1.12.261</dep.aws-sdk.version>
<dep.okhttp.version>3.14.9</dep.okhttp.version>
<dep.jsonwebtoken.version>0.11.5</dep.jsonwebtoken.version>
<dep.oracle.version>21.9.0.0</dep.oracle.version>
<dep.drift.version>1.14</dep.drift.version>
Expand All @@ -66,7 +65,7 @@
<dep.confluent.version>7.3.1</dep.confluent.version>
<dep.kafka-clients.version>3.3.2</dep.kafka-clients.version>
<dep.casandra.version>4.14.0</dep.casandra.version>
<dep.minio.version>7.1.4</dep.minio.version>
<dep.minio.version>8.4.5</dep.minio.version>
<dep.iceberg.version>1.1.0</dep.iceberg.version>
<dep.protobuf.version>3.21.6</dep.protobuf.version>
<dep.wire.version>4.5.0</dep.wire.version>
Expand Down Expand Up @@ -1371,32 +1370,10 @@

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>${dep.okhttp.version}</version>
</dependency>

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<version>${dep.okhttp.version}</version>
</dependency>

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>${dep.okhttp.version}</version>
</dependency>

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-tls</artifactId>
<version>${dep.okhttp.version}</version>
</dependency>

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-urlconnection</artifactId>
<version>${dep.okhttp.version}</version>
<artifactId>okhttp-bom</artifactId>
<type>pom</type>
<version>4.10.0</version>
<scope>import</scope>
</dependency>

<dependency>
Expand Down
5 changes: 0 additions & 5 deletions testing/trino-product-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,6 @@
<artifactId>assertj-core</artifactId>
</dependency>

<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</dependency>

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
Expand Down

0 comments on commit 4be1401

Please sign in to comment.