• 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/QueryStrings/ClaimsToQueryStringMiddleware.cs
1
using Microsoft.AspNetCore.Http;
2
using Ocelot.Logging;
3
using Ocelot.Middleware;
4

5
namespace Ocelot.QueryStrings;
6

7
public class ClaimsToQueryStringMiddleware : OcelotMiddleware
8
{
9
    private readonly RequestDelegate _next;
10
    private readonly IAddQueriesToRequest _addQueriesToRequest;
11

12
    public ClaimsToQueryStringMiddleware(RequestDelegate next,
13
        IOcelotLoggerFactory loggerFactory,
14
        IAddQueriesToRequest addQueriesToRequest)
15
            : base(loggerFactory.CreateLogger<ClaimsToQueryStringMiddleware>())
×
16
    {
×
17
        _next = next;
×
18
        _addQueriesToRequest = addQueriesToRequest;
×
19
    }
×
20

21
    public async Task Invoke(HttpContext httpContext)
22
    {
×
23
        var downstreamRoute = httpContext.Items.DownstreamRoute();
×
24

25
        if (downstreamRoute.ClaimsToQueries.Any())
×
26
        {
×
27
            Logger.LogInformation(() => $"{downstreamRoute.DownstreamPathTemplate.Value} has instructions to convert claims to queries");
×
28

29
            var downstreamRequest = httpContext.Items.DownstreamRequest();
×
30

31
            var response = _addQueriesToRequest.SetQueriesOnDownstreamRequest(downstreamRoute.ClaimsToQueries, httpContext.User.Claims, downstreamRequest);
×
32

33
            if (response.IsError)
×
34
            {
×
35
                Logger.LogWarning("there was an error setting queries on context, setting pipeline error");
×
36

37
                httpContext.Items.UpsertErrors(response.Errors);
×
38
                return;
×
39
            }
40
        }
×
41

42
        await _next.Invoke(httpContext);
×
43
    }
×
44
}
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