mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-22 06:42:50 +08:00
Merge branch 'feature/httphandler-maxconnectionperserver' of https://github.com/buretjph/Ocelot into buretjph-feature/httphandler-maxconnectionperserver
This commit is contained in:
commit
19881d51ff
@ -18,8 +18,11 @@
|
|||||||
{
|
{
|
||||||
var useTracing = _tracer != null && options.UseTracing;
|
var useTracing = _tracer != null && options.UseTracing;
|
||||||
|
|
||||||
|
//be sure that maxConnectionPerServer is in correct range of values
|
||||||
|
int maxConnectionPerServer = (options.MaxConnectionsPerServer > 0) ? maxConnectionPerServer = options.MaxConnectionsPerServer : maxConnectionPerServer = int.MaxValue;
|
||||||
|
|
||||||
return new HttpHandlerOptions(options.AllowAutoRedirect,
|
return new HttpHandlerOptions(options.AllowAutoRedirect,
|
||||||
options.UseCookieContainer, useTracing, options.UseProxy);
|
options.UseCookieContainer, useTracing, options.UseProxy, maxConnectionPerServer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
AllowAutoRedirect = false;
|
AllowAutoRedirect = false;
|
||||||
UseCookieContainer = false;
|
UseCookieContainer = false;
|
||||||
UseProxy = true;
|
UseProxy = true;
|
||||||
|
MaxConnectionsPerServer = int.MaxValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AllowAutoRedirect { get; set; }
|
public bool AllowAutoRedirect { get; set; }
|
||||||
@ -16,5 +17,7 @@
|
|||||||
public bool UseTracing { get; set; }
|
public bool UseTracing { get; set; }
|
||||||
|
|
||||||
public bool UseProxy { get; set; }
|
public bool UseProxy { get; set; }
|
||||||
|
|
||||||
|
public int MaxConnectionsPerServer { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,32 +6,44 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class HttpHandlerOptions
|
public class HttpHandlerOptions
|
||||||
{
|
{
|
||||||
public HttpHandlerOptions(bool allowAutoRedirect, bool useCookieContainer, bool useTracing, bool useProxy)
|
public HttpHandlerOptions(bool allowAutoRedirect, bool useCookieContainer, bool useTracing, bool useProxy, int maxConnectionsPerServer)
|
||||||
{
|
{
|
||||||
AllowAutoRedirect = allowAutoRedirect;
|
AllowAutoRedirect = allowAutoRedirect;
|
||||||
UseCookieContainer = useCookieContainer;
|
UseCookieContainer = useCookieContainer;
|
||||||
UseTracing = useTracing;
|
UseTracing = useTracing;
|
||||||
UseProxy = useProxy;
|
UseProxy = useProxy;
|
||||||
|
MaxConnectionsPerServer = maxConnectionsPerServer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specify if auto redirect is enabled
|
/// Specify if auto redirect is enabled
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <value>AllowAutoRedirect</value>
|
||||||
public bool AllowAutoRedirect { get; private set; }
|
public bool AllowAutoRedirect { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specify is handler has to use a cookie container
|
/// Specify is handler has to use a cookie container
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <value>UseCookieContainer</value>
|
||||||
public bool UseCookieContainer { get; private set; }
|
public bool UseCookieContainer { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specify is handler has to use a opentracing
|
/// Specify is handler has to use a opentracing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <value>UseTracing</value>
|
||||||
public bool UseTracing { get; private set; }
|
public bool UseTracing { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specify if handler has to use a proxy
|
/// Specify if handler has to use a proxy
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <value>UseProxy</value>
|
||||||
public bool UseProxy { get; private set; }
|
public bool UseProxy { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Specify the maximum of concurrent connection to a network endpoint
|
||||||
|
/// </summary>
|
||||||
|
/// <value>MaxConnectionsPerServer</value>
|
||||||
|
public int MaxConnectionsPerServer { get; private set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
private bool _useCookieContainer;
|
private bool _useCookieContainer;
|
||||||
private bool _useTracing;
|
private bool _useTracing;
|
||||||
private bool _useProxy;
|
private bool _useProxy;
|
||||||
|
private int _maxConnectionPerServer;
|
||||||
|
|
||||||
public HttpHandlerOptionsBuilder WithAllowAutoRedirect(bool input)
|
public HttpHandlerOptionsBuilder WithAllowAutoRedirect(bool input)
|
||||||
{
|
{
|
||||||
@ -30,10 +31,16 @@
|
|||||||
_useProxy = useProxy;
|
_useProxy = useProxy;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public HttpHandlerOptionsBuilder WithUseMaxConnectionPerServer(int maxConnectionPerServer)
|
||||||
|
{
|
||||||
|
_maxConnectionPerServer = maxConnectionPerServer;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public HttpHandlerOptions Build()
|
public HttpHandlerOptions Build()
|
||||||
{
|
{
|
||||||
return new HttpHandlerOptions(_allowAutoRedirect, _useCookieContainer, _useTracing, _useProxy);
|
return new HttpHandlerOptions(_allowAutoRedirect, _useCookieContainer, _useTracing, _useProxy, _maxConnectionPerServer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,9 @@ namespace Ocelot.Requester
|
|||||||
{
|
{
|
||||||
AllowAutoRedirect = context.DownstreamReRoute.HttpHandlerOptions.AllowAutoRedirect,
|
AllowAutoRedirect = context.DownstreamReRoute.HttpHandlerOptions.AllowAutoRedirect,
|
||||||
UseCookies = context.DownstreamReRoute.HttpHandlerOptions.UseCookieContainer,
|
UseCookies = context.DownstreamReRoute.HttpHandlerOptions.UseCookieContainer,
|
||||||
UseProxy = context.DownstreamReRoute.HttpHandlerOptions.UseProxy
|
UseProxy = context.DownstreamReRoute.HttpHandlerOptions.UseProxy,
|
||||||
|
MaxConnectionsPerServer = context.DownstreamReRoute.HttpHandlerOptions.MaxConnectionsPerServer
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,6 +103,7 @@ namespace Ocelot.Requester
|
|||||||
AllowAutoRedirect = context.DownstreamReRoute.HttpHandlerOptions.AllowAutoRedirect,
|
AllowAutoRedirect = context.DownstreamReRoute.HttpHandlerOptions.AllowAutoRedirect,
|
||||||
UseCookies = context.DownstreamReRoute.HttpHandlerOptions.UseCookieContainer,
|
UseCookies = context.DownstreamReRoute.HttpHandlerOptions.UseCookieContainer,
|
||||||
UseProxy = context.DownstreamReRoute.HttpHandlerOptions.UseProxy,
|
UseProxy = context.DownstreamReRoute.HttpHandlerOptions.UseProxy,
|
||||||
|
MaxConnectionsPerServer = context.DownstreamReRoute.HttpHandlerOptions.MaxConnectionsPerServer,
|
||||||
CookieContainer = new CookieContainer()
|
CookieContainer = new CookieContainer()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ namespace Ocelot.UnitTests.Configuration
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var expectedOptions = new HttpHandlerOptions(false, false, false, true);
|
var expectedOptions = new HttpHandlerOptions(false, false, false, true, int.MaxValue);
|
||||||
|
|
||||||
this.Given(x => GivenTheFollowing(fileReRoute))
|
this.Given(x => GivenTheFollowing(fileReRoute))
|
||||||
.When(x => WhenICreateHttpHandlerOptions())
|
.When(x => WhenICreateHttpHandlerOptions())
|
||||||
@ -60,7 +60,7 @@ namespace Ocelot.UnitTests.Configuration
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var expectedOptions = new HttpHandlerOptions(false, false, true, true);
|
var expectedOptions = new HttpHandlerOptions(false, false, true, true, int.MaxValue);
|
||||||
|
|
||||||
this.Given(x => GivenTheFollowing(fileReRoute))
|
this.Given(x => GivenTheFollowing(fileReRoute))
|
||||||
.And(x => GivenARealTracer())
|
.And(x => GivenARealTracer())
|
||||||
@ -73,7 +73,7 @@ namespace Ocelot.UnitTests.Configuration
|
|||||||
public void should_create_options_with_useCookie_false_and_allowAutoRedirect_true_as_default()
|
public void should_create_options_with_useCookie_false_and_allowAutoRedirect_true_as_default()
|
||||||
{
|
{
|
||||||
var fileReRoute = new FileReRoute();
|
var fileReRoute = new FileReRoute();
|
||||||
var expectedOptions = new HttpHandlerOptions(false, false, false, true);
|
var expectedOptions = new HttpHandlerOptions(false, false, false, true, int.MaxValue);
|
||||||
|
|
||||||
this.Given(x => GivenTheFollowing(fileReRoute))
|
this.Given(x => GivenTheFollowing(fileReRoute))
|
||||||
.When(x => WhenICreateHttpHandlerOptions())
|
.When(x => WhenICreateHttpHandlerOptions())
|
||||||
@ -94,7 +94,7 @@ namespace Ocelot.UnitTests.Configuration
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var expectedOptions = new HttpHandlerOptions(false, false, false, true);
|
var expectedOptions = new HttpHandlerOptions(false, false, false, true, int.MaxValue);
|
||||||
|
|
||||||
this.Given(x => GivenTheFollowing(fileReRoute))
|
this.Given(x => GivenTheFollowing(fileReRoute))
|
||||||
.When(x => WhenICreateHttpHandlerOptions())
|
.When(x => WhenICreateHttpHandlerOptions())
|
||||||
@ -110,7 +110,7 @@ namespace Ocelot.UnitTests.Configuration
|
|||||||
HttpHandlerOptions = new FileHttpHandlerOptions()
|
HttpHandlerOptions = new FileHttpHandlerOptions()
|
||||||
};
|
};
|
||||||
|
|
||||||
var expectedOptions = new HttpHandlerOptions(false, false, false, true);
|
var expectedOptions = new HttpHandlerOptions(false, false, false, true, int.MaxValue);
|
||||||
|
|
||||||
this.Given(x => GivenTheFollowing(fileReRoute))
|
this.Given(x => GivenTheFollowing(fileReRoute))
|
||||||
.When(x => WhenICreateHttpHandlerOptions())
|
.When(x => WhenICreateHttpHandlerOptions())
|
||||||
@ -129,7 +129,45 @@ namespace Ocelot.UnitTests.Configuration
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var expectedOptions = new HttpHandlerOptions(false, false, false, false);
|
var expectedOptions = new HttpHandlerOptions(false, false, false, false, int.MaxValue);
|
||||||
|
|
||||||
|
this.Given(x => GivenTheFollowing(fileReRoute))
|
||||||
|
.When(x => WhenICreateHttpHandlerOptions())
|
||||||
|
.Then(x => ThenTheFollowingOptionsReturned(expectedOptions))
|
||||||
|
.BDDfy();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void should_create_options_with_specified_MaxConnectionsPerServer()
|
||||||
|
{
|
||||||
|
var fileReRoute = new FileReRoute
|
||||||
|
{
|
||||||
|
HttpHandlerOptions = new FileHttpHandlerOptions
|
||||||
|
{
|
||||||
|
MaxConnectionsPerServer = 10
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var expectedOptions = new HttpHandlerOptions(false, false, false, true, 10);
|
||||||
|
|
||||||
|
this.Given(x => GivenTheFollowing(fileReRoute))
|
||||||
|
.When(x => WhenICreateHttpHandlerOptions())
|
||||||
|
.Then(x => ThenTheFollowingOptionsReturned(expectedOptions))
|
||||||
|
.BDDfy();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void should_create_options_fixing_specified_MaxConnectionsPerServer_range()
|
||||||
|
{
|
||||||
|
var fileReRoute = new FileReRoute
|
||||||
|
{
|
||||||
|
HttpHandlerOptions = new FileHttpHandlerOptions
|
||||||
|
{
|
||||||
|
MaxConnectionsPerServer = -1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var expectedOptions = new HttpHandlerOptions(false, false, false, true, int.MaxValue);
|
||||||
|
|
||||||
this.Given(x => GivenTheFollowing(fileReRoute))
|
this.Given(x => GivenTheFollowing(fileReRoute))
|
||||||
.When(x => WhenICreateHttpHandlerOptions())
|
.When(x => WhenICreateHttpHandlerOptions())
|
||||||
@ -154,6 +192,7 @@ namespace Ocelot.UnitTests.Configuration
|
|||||||
_httpHandlerOptions.UseCookieContainer.ShouldBe(expected.UseCookieContainer);
|
_httpHandlerOptions.UseCookieContainer.ShouldBe(expected.UseCookieContainer);
|
||||||
_httpHandlerOptions.UseTracing.ShouldBe(expected.UseTracing);
|
_httpHandlerOptions.UseTracing.ShouldBe(expected.UseTracing);
|
||||||
_httpHandlerOptions.UseProxy.ShouldBe(expected.UseProxy);
|
_httpHandlerOptions.UseProxy.ShouldBe(expected.UseProxy);
|
||||||
|
_httpHandlerOptions.MaxConnectionsPerServer.ShouldBe(expected.MaxConnectionsPerServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GivenARealTracer()
|
private void GivenARealTracer()
|
||||||
|
@ -52,7 +52,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true, int.MaxValue))
|
||||||
.WithDelegatingHandlers(new List<string>
|
.WithDelegatingHandlers(new List<string>
|
||||||
{
|
{
|
||||||
"FakeDelegatingHandler",
|
"FakeDelegatingHandler",
|
||||||
@ -88,7 +88,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true, int.MaxValue))
|
||||||
.WithDelegatingHandlers(new List<string>
|
.WithDelegatingHandlers(new List<string>
|
||||||
{
|
{
|
||||||
"FakeDelegatingHandlerTwo",
|
"FakeDelegatingHandlerTwo",
|
||||||
@ -125,7 +125,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true, int.MaxValue))
|
||||||
.WithDelegatingHandlers(new List<string>
|
.WithDelegatingHandlers(new List<string>
|
||||||
{
|
{
|
||||||
"FakeDelegatingHandlerTwo",
|
"FakeDelegatingHandlerTwo",
|
||||||
@ -161,7 +161,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true, int.MaxValue))
|
||||||
.WithDelegatingHandlers(new List<string>
|
.WithDelegatingHandlers(new List<string>
|
||||||
{
|
{
|
||||||
"FakeDelegatingHandler",
|
"FakeDelegatingHandler",
|
||||||
@ -195,7 +195,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, false, true, int.MaxValue))
|
||||||
.WithDelegatingHandlers(new List<string>
|
.WithDelegatingHandlers(new List<string>
|
||||||
{
|
{
|
||||||
"FakeDelegatingHandler",
|
"FakeDelegatingHandler",
|
||||||
@ -249,7 +249,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, false, true)).WithLoadBalancerKey("").Build();
|
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, false, true, int.MaxValue)).WithLoadBalancerKey("").Build();
|
||||||
|
|
||||||
this.Given(x => GivenTheFollowingRequest(reRoute))
|
this.Given(x => GivenTheFollowingRequest(reRoute))
|
||||||
.And(x => GivenTheQosFactoryReturns(new FakeQoSHandler()))
|
.And(x => GivenTheQosFactoryReturns(new FakeQoSHandler()))
|
||||||
@ -269,7 +269,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, false, true)).WithLoadBalancerKey("").Build();
|
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, false, true, int.MaxValue)).WithLoadBalancerKey("").Build();
|
||||||
|
|
||||||
this.Given(x => GivenTheFollowingRequest(reRoute))
|
this.Given(x => GivenTheFollowingRequest(reRoute))
|
||||||
.And(x => GivenTheServiceProviderReturnsNothing())
|
.And(x => GivenTheServiceProviderReturnsNothing())
|
||||||
@ -289,7 +289,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, false, true)).WithLoadBalancerKey("").Build();
|
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, false, true, int.MaxValue)).WithLoadBalancerKey("").Build();
|
||||||
|
|
||||||
this.Given(x => GivenTheFollowingRequest(reRoute))
|
this.Given(x => GivenTheFollowingRequest(reRoute))
|
||||||
.And(x => GivenTheQosFactoryReturns(new FakeQoSHandler()))
|
.And(x => GivenTheQosFactoryReturns(new FakeQoSHandler()))
|
||||||
@ -309,7 +309,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, false, true)).WithLoadBalancerKey("").Build();
|
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, false, true, int.MaxValue)).WithLoadBalancerKey("").Build();
|
||||||
|
|
||||||
this.Given(x => GivenTheFollowingRequest(reRoute))
|
this.Given(x => GivenTheFollowingRequest(reRoute))
|
||||||
.And(x => GivenTheQosFactoryReturns(new FakeQoSHandler()))
|
.And(x => GivenTheQosFactoryReturns(new FakeQoSHandler()))
|
||||||
@ -331,7 +331,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
@ -361,7 +361,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(true, true, true, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
||||||
.WithQosOptions(new QoSOptionsBuilder().Build())
|
.WithQosOptions(new QoSOptionsBuilder().Build())
|
||||||
@ -73,7 +73,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
||||||
.WithQosOptions(new QoSOptionsBuilder().Build())
|
.WithQosOptions(new QoSOptionsBuilder().Build())
|
||||||
@ -99,7 +99,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
||||||
.WithQosOptions(new QoSOptionsBuilder().Build())
|
.WithQosOptions(new QoSOptionsBuilder().Build())
|
||||||
@ -126,7 +126,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRouteA = new DownstreamReRouteBuilder()
|
var reRouteA = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithContainsQueryString(true).WithOriginalValue("").Build())
|
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithContainsQueryString(true).WithOriginalValue("").Build())
|
||||||
.WithQosOptions(new QoSOptionsBuilder().Build())
|
.WithQosOptions(new QoSOptionsBuilder().Build())
|
||||||
@ -134,7 +134,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRouteB = new DownstreamReRouteBuilder()
|
var reRouteB = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithContainsQueryString(true).WithOriginalValue("").Build())
|
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithContainsQueryString(true).WithOriginalValue("").Build())
|
||||||
.WithQosOptions(new QoSOptionsBuilder().Build())
|
.WithQosOptions(new QoSOptionsBuilder().Build())
|
||||||
@ -161,7 +161,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
||||||
.WithQosOptions(new QoSOptionsBuilder().Build())
|
.WithQosOptions(new QoSOptionsBuilder().Build())
|
||||||
@ -184,7 +184,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
||||||
.WithQosOptions(new QoSOptionsBuilder().Build())
|
.WithQosOptions(new QoSOptionsBuilder().Build())
|
||||||
@ -216,7 +216,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(false, true, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(false, true, false, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
||||||
.WithQosOptions(new QoSOptionsBuilder().Build())
|
.WithQosOptions(new QoSOptionsBuilder().Build())
|
||||||
@ -252,7 +252,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
.WithUpstreamPathTemplate(new UpstreamPathTemplateBuilder().WithOriginalValue("").Build())
|
||||||
.WithQosOptions(new QoSOptionsBuilder().Build())
|
.WithQosOptions(new QoSOptionsBuilder().Build())
|
||||||
|
@ -57,7 +57,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.WithUpstreamPathTemplate(upstreamTemplate)
|
.WithUpstreamPathTemplate(upstreamTemplate)
|
||||||
.WithQosOptions(new QoSOptionsBuilder().Build())
|
.WithQosOptions(new QoSOptionsBuilder().Build())
|
||||||
@ -86,7 +86,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.WithUpstreamPathTemplate(upstreamTemplate)
|
.WithUpstreamPathTemplate(upstreamTemplate)
|
||||||
.WithQosOptions(new QoSOptionsBuilder().Build())
|
.WithQosOptions(new QoSOptionsBuilder().Build())
|
||||||
@ -114,7 +114,7 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
|
|
||||||
var reRoute = new DownstreamReRouteBuilder()
|
var reRoute = new DownstreamReRouteBuilder()
|
||||||
.WithQosOptions(qosOptions)
|
.WithQosOptions(qosOptions)
|
||||||
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true))
|
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false, true, int.MaxValue))
|
||||||
.WithLoadBalancerKey("")
|
.WithLoadBalancerKey("")
|
||||||
.WithUpstreamPathTemplate(upstreamTemplate)
|
.WithUpstreamPathTemplate(upstreamTemplate)
|
||||||
.WithQosOptions(new QoSOptionsBuilder().WithTimeoutValue(1).Build())
|
.WithQosOptions(new QoSOptionsBuilder().WithTimeoutValue(1).Build())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user