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
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
import org.apache.hc.client5.http.ssl.TrustSelfSignedStrategy;
import org.apache.hc.core5.http.HeaderElement;
import org.apache.hc.core5.http.HttpHeaders;
import org.apache.hc.core5.http.HttpRequest;
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.config.Registry;
Expand All @@ -37,7 +38,6 @@
import org.apache.hc.core5.ssl.SSLContextBuilder;
import org.apache.hc.core5.util.TextUtils;
import org.apache.hc.core5.util.TimeValue;
import org.apache.http.protocol.HTTP;
import org.cloudfoundry.identity.uaa.impl.config.RestTemplateConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -173,7 +173,7 @@ public UaaConnectionKeepAliveStrategy(long connectionKeepAliveMax) {

@Override
public TimeValue getKeepAliveDuration(HttpResponse httpResponse, HttpContext httpContext) {
BasicHeaderElementIterator elementIterator = new BasicHeaderElementIterator(httpResponse.headerIterator(HTTP.CONN_KEEP_ALIVE));
BasicHeaderElementIterator elementIterator = new BasicHeaderElementIterator(httpResponse.headerIterator(HttpHeaders.KEEP_ALIVE));
long result = connectionKeepAliveMax;

while (elementIterator.hasNext()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public boolean hasError(ClientHttpResponse response) throws IOException {

private void setupConnectionFactory(OAuth2RestTemplate client) {
if (Boolean.getBoolean("http.components.enabled")
&& ClassUtils.isPresent("org.apache.http.client.config.RequestConfig",
&& ClassUtils.isPresent("org.apache.hc.client5.http.config.RequestConfig",
null)) {
client.setRequestFactory(new HttpComponentsClientHttpRequestFactory() {
@Override
Expand Down
Loading