HTTPCLIENT-1431: (Regression) deprecated connection manager cannot be used witha custom LayeredSchemeSocketFactory
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1539286 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
85a99b22e4
commit
f3a6831d47
|
@ -1,6 +1,10 @@
|
|||
Changes since 4.3.1
|
||||
-------------------
|
||||
|
||||
* [HTTPCLIENT-1431] (Regression) deprecated connection manager cannot be used with
|
||||
a custom LayeredSchemeSocketFactory.
|
||||
Contributed by Oleg Kalnichevski <olegk at apache.org>
|
||||
|
||||
* [HTTPCLIENT-1425] Fixed socket closed exception thrown by caching HttpClient when the origin
|
||||
server sends a long chunked response.
|
||||
Contributed by James Leigh <james at 3roundstones dot com>
|
||||
|
|
|
@ -48,7 +48,6 @@ import org.apache.http.conn.scheme.Scheme;
|
|||
import org.apache.http.conn.scheme.SchemeLayeredSocketFactory;
|
||||
import org.apache.http.conn.scheme.SchemeRegistry;
|
||||
import org.apache.http.conn.scheme.SchemeSocketFactory;
|
||||
import org.apache.http.conn.socket.LayeredConnectionSocketFactory;
|
||||
import org.apache.http.params.HttpConnectionParams;
|
||||
import org.apache.http.params.HttpParams;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
|
@ -211,7 +210,7 @@ public class DefaultClientConnectionOperator implements ClientConnectionOperator
|
|||
|
||||
final SchemeRegistry registry = getSchemeRegistry(context);
|
||||
final Scheme schm = registry.getScheme(target.getSchemeName());
|
||||
Asserts.check(schm.getSchemeSocketFactory() instanceof LayeredConnectionSocketFactory,
|
||||
Asserts.check(schm.getSchemeSocketFactory() instanceof SchemeLayeredSocketFactory,
|
||||
"Socket factory must implement SchemeLayeredSocketFactory");
|
||||
final SchemeLayeredSocketFactory lsf = (SchemeLayeredSocketFactory) schm.getSchemeSocketFactory();
|
||||
final Socket sock = lsf.createLayeredSocket(
|
||||
|
|
Loading…
Reference in New Issue