fix work around classloaders for field preencoders
This commit is contained in:
parent
64e49a1fe5
commit
a4d4b3ab57
|
@ -52,7 +52,7 @@ public class PreEncodedHttpField extends HttpField
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
HttpFieldPreEncoder enc = iter.next();
|
encoders.add(iter.next());
|
||||||
}
|
}
|
||||||
catch(Error|RuntimeException e)
|
catch(Error|RuntimeException e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -366,6 +366,19 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
|
||||||
_defaultProtocol=factory.getProtocol();
|
_defaultProtocol=factory.getProtocol();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addIfAbsentConnectionFactory(ConnectionFactory factory)
|
||||||
|
{
|
||||||
|
synchronized (_factories)
|
||||||
|
{
|
||||||
|
if (_factories.containsKey(factory.getProtocol()))
|
||||||
|
return;
|
||||||
|
_factories.put(factory.getProtocol().toLowerCase(Locale.ENGLISH), factory);
|
||||||
|
addBean(factory);
|
||||||
|
if (_defaultProtocol==null)
|
||||||
|
_defaultProtocol=factory.getProtocol();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ConnectionFactory removeConnectionFactory(String protocol)
|
public ConnectionFactory removeConnectionFactory(String protocol)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue