• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ThreeMammals / Ocelot / 26761608736

01 Jun 2026 02:34PM UTC coverage: 0.0% (-95.4%) from 95.403%
26761608736

Pull #2394

github

web-flow
Merge e39fc0db2 into e4022a7d8
Pull Request #2394: Harden `FileConfigurationPoller` against timer reentrancy and callback thread leaks, and stabilize `TimeoutDelegatingHandler` timeout test

0 of 7112 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
src/Ocelot/Configuration/HttpHandlerOptions.cs
1
using Ocelot.Configuration.File;
2

3
namespace Ocelot.Configuration;
4

5
/// <summary>
6
/// Describes configuration parameters for http handler, that is created to handle a request to service.
7
/// </summary>
8
public class HttpHandlerOptions //: SocketsHttpHandler // TODO Think about using inheritance or composition design since we initialize the SocketsHttpHandler instance with the options
9
{
10
    public const int DefaultPooledConnectionLifetimeSeconds = 120;
11

12
    public HttpHandlerOptions()
×
13
    {
×
14
        MaxConnectionsPerServer = int.MaxValue;
×
15
        PooledConnectionLifeTime = TimeSpan.FromSeconds(DefaultPooledConnectionLifetimeSeconds);
×
16
    }
×
17

18
    public HttpHandlerOptions(FileHttpHandlerOptions from)
×
19
    {
×
20
        AllowAutoRedirect = from.AllowAutoRedirect ?? false;
×
21
        MaxConnectionsPerServer = from.MaxConnectionsPerServer.HasValue && from.MaxConnectionsPerServer.Value > 0
×
22
            ? from.MaxConnectionsPerServer.Value : int.MaxValue;
×
23
        PooledConnectionLifeTime = TimeSpan.FromSeconds(from.PooledConnectionLifetimeSeconds ?? DefaultPooledConnectionLifetimeSeconds);
×
24
        UseCookieContainer = from.UseCookieContainer ?? false;
×
25
        UseProxy = from.UseProxy ?? false;
×
26
        UseTracing = from.UseTracing ?? false;
×
27
    }
×
28

29
    public HttpHandlerOptions(FileHttpHandlerOptions from, bool useTracing)
30
        : this(from)
×
31
    {
×
32
        UseTracing = useTracing && (from.UseTracing ?? false);
×
33
    }
×
34

35
    /// <summary>
36
    /// Specify if auto redirect is enabled.
37
    /// </summary>
38
    /// <value>AllowAutoRedirect.</value>
39
    public bool AllowAutoRedirect { get; init; }
40

41
    /// <summary>
42
    /// Specify is handler has to use a cookie container.
43
    /// </summary>
44
    /// <value>UseCookieContainer.</value>
45
    public bool UseCookieContainer { get; init; }
46

47
    /// <summary>
48
    /// Specify is handler has to use a opentracing.
49
    /// </summary>
50
    /// <value>UseTracing.</value>
51
    public bool UseTracing { get; init; }
52

53
    /// <summary>
54
    /// Specify if handler has to use a proxy.
55
    /// </summary>
56
    /// <value>UseProxy.</value>
57
    public bool UseProxy { get; init; }
58

59
    /// <summary>
60
    /// Specify the maximum of concurrent connection to a network endpoint.
61
    /// </summary>
62
    /// <value>MaxConnectionsPerServer.</value>
63
    public int MaxConnectionsPerServer { get; init; }
64

65
    /// <summary>
66
    /// Specify the maximum of time a connection can be pooled.
67
    /// </summary>
68
    /// <value>PooledConnectionLifeTime.</value>
69
    public TimeSpan PooledConnectionLifeTime { get; init; }
70
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc