mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-17 07:26:47 +00:00
Fixed bug in #determineRoute() causing secure (layered) connections to be treated as plain ones.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@554003 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
553a1b4cfd
commit
8e2f192812
@ -274,15 +274,17 @@ protected RoutedRequest determineRoute(HttpHost target,
|
||||
HttpHost proxy = (HttpHost) request.getParams().getParameter(
|
||||
HttpClientParams.DEFAULT_PROXY);
|
||||
|
||||
Scheme schm = getConnectionManager().getSchemeRegistry().
|
||||
getScheme(target.getSchemeName());
|
||||
// as it is typically used for TLS/SSL, we assume that
|
||||
// a layered scheme implies a secure connection
|
||||
boolean secure = schm.isLayered();
|
||||
|
||||
HttpRoute route;
|
||||
if (proxy == null) {
|
||||
route = new HttpRoute(target);
|
||||
route = new HttpRoute(target, null, secure);
|
||||
} else {
|
||||
Scheme schm = getConnectionManager().getSchemeRegistry().
|
||||
getScheme(target.getSchemeName());
|
||||
// as it is typically used for TLS/SSL, we assume that
|
||||
// a layered scheme implies a secure connection
|
||||
route = new HttpRoute(target, null, proxy, schm.isLayered());
|
||||
route = new HttpRoute(target, null, proxy, secure);
|
||||
}
|
||||
return new RoutedRequest.Impl(request, route);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user