Issue #3103
delay setting transport.setHttpClient until late in doStart Do not add DumpableCollection as a bean Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
parent
859004bef4
commit
78a775396e
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
package org.eclipse.jetty.client;
|
package org.eclipse.jetty.client;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.net.CookieManager;
|
import java.net.CookieManager;
|
||||||
import java.net.CookiePolicy;
|
import java.net.CookiePolicy;
|
||||||
import java.net.CookieStore;
|
import java.net.CookieStore;
|
||||||
|
@ -180,7 +181,6 @@ public class HttpClient extends ContainerLifeCycle
|
||||||
public HttpClient(HttpClientTransport transport, SslContextFactory sslContextFactory)
|
public HttpClient(HttpClientTransport transport, SslContextFactory sslContextFactory)
|
||||||
{
|
{
|
||||||
this.transport = transport;
|
this.transport = transport;
|
||||||
transport.setHttpClient(this);
|
|
||||||
addBean(transport);
|
addBean(transport);
|
||||||
|
|
||||||
if (sslContextFactory == null)
|
if (sslContextFactory == null)
|
||||||
|
@ -192,7 +192,12 @@ public class HttpClient extends ContainerLifeCycle
|
||||||
addBean(sslContextFactory);
|
addBean(sslContextFactory);
|
||||||
addBean(handlers);
|
addBean(handlers);
|
||||||
addBean(decoderFactories);
|
addBean(decoderFactories);
|
||||||
addBean(new DumpableCollection("requestListeners", requestListeners));
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dump(Appendable out, String indent) throws IOException
|
||||||
|
{
|
||||||
|
dumpObjects(out, indent, new DumpableCollection("requestListeners", requestListeners));
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpClientTransport getTransport()
|
public HttpClientTransport getTransport()
|
||||||
|
@ -241,6 +246,7 @@ public class HttpClient extends ContainerLifeCycle
|
||||||
cookieManager = newCookieManager();
|
cookieManager = newCookieManager();
|
||||||
cookieStore = cookieManager.getCookieStore();
|
cookieStore = cookieManager.getCookieStore();
|
||||||
|
|
||||||
|
transport.setHttpClient(this);
|
||||||
super.doStart();
|
super.doStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue