Upgrade okhttp_version to 4.9.3. (#3683)
* Upgrade okhttp_version to 4.9.3. Remove dependency on okhttp.internal package. Fixes https://github.com/hapifhir/hapi-fhir/issues/3682 * Include "okhttp/" before the okhttp version in the user agent. Fixup GenericClientDstu3IT test expectation for the new okhttp version. Fixes https://github.com/hapifhir/hapi-fhir/pull/3683#issuecomment-1151492939 * Remove the okhttp version from the user-agent. For consistency with the apache-based client, also simplifies upgrade (tests won't fail). Fixes https://github.com/hapifhir/hapi-fhir/pull/3683#issuecomment-1151589776
This commit is contained in:
parent
1eeb6112f6
commit
e2effc65b8
|
@ -81,7 +81,7 @@ public class GenericClientDstu3IT {
|
|||
}
|
||||
|
||||
private String expectedUserAgent() {
|
||||
return "HAPI-FHIR/" + VersionUtil.getVersion() + " (FHIR Client; FHIR " + FhirVersionEnum.DSTU3.getFhirVersionString() + "/DSTU3; okhttp/3.8.1)";
|
||||
return "HAPI-FHIR/" + VersionUtil.getVersion() + " (FHIR Client; FHIR " + FhirVersionEnum.DSTU3.getFhirVersionString() + "/DSTU3; okhttp)";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ import ca.uhn.fhir.rest.client.api.*;
|
|||
import ca.uhn.fhir.rest.client.impl.BaseHttpClientInvocation;
|
||||
import ca.uhn.fhir.rest.client.method.MethodUtil;
|
||||
import okhttp3.*;
|
||||
import okhttp3.internal.Version;
|
||||
|
||||
/**
|
||||
* A Http Request based on OkHttp. This is an adapter around the class
|
||||
|
@ -127,7 +126,7 @@ public class OkHttpRestfulClient implements IHttpClient {
|
|||
}
|
||||
|
||||
private void addUserAgentHeader(OkHttpRestfulRequest theHttpRequest, FhirContext theContext) {
|
||||
theHttpRequest.addHeader("User-Agent", HttpClientUtil.createUserAgentString(theContext, Version.userAgent()));
|
||||
theHttpRequest.addHeader("User-Agent", HttpClientUtil.createUserAgentString(theContext, "okhttp"));
|
||||
}
|
||||
|
||||
private void addAcceptCharsetHeader(OkHttpRestfulRequest theHttpRequest) {
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -814,7 +814,7 @@
|
|||
<jackson_databind_version>2.13.2.2</jackson_databind_version>
|
||||
<maven_assembly_plugin_version>3.3.0</maven_assembly_plugin_version>
|
||||
<maven_license_plugin_version>1.8</maven_license_plugin_version>
|
||||
<okhttp_version>3.8.1</okhttp_version>
|
||||
<okhttp_version>4.9.3</okhttp_version>
|
||||
<poi_version>4.1.2</poi_version>
|
||||
<poi_ooxml_schemas_version>1.4</poi_ooxml_schemas_version>
|
||||
<resteasy_version>5.0.2.Final</resteasy_version>
|
||||
|
|
Loading…
Reference in New Issue