dotnet / dotnet/extensions

Url suffix ignored when hedging

Open
#6,298 1 comment 0 reactions 0 assignees View on GitHub
area-resilience bug untriaged
Dominant language
C#
Stars
3.2k
Forks
894
Avg merge
1d 12h
Merged PRs (30d)
23

Description

### Description

Howdy!

I may have stumbled upon an issue while trying to configure a resiliency pipeline. It seems that, when hedging is used, only the host of the request is replaced based on the configured urls, but their additional path gets ignored:

![Image](https://github.com/user-attachments/assets/b93f95ab-ce71-4db5-b50c-5ba3632f4bc0)

![Image](https://github.com/user-attachments/assets/3ed5a846-6d02-4703-b594-df9320c01d8d)

I would expect that the full url is used, especially given the examples using full urls as hedge urls ([here](https://learn.microsoft.com/en-us/dotnet/core/resilience/http-resilience?tabs=dotnet-cli#customize-hedging-handler-route-selection) for example).

I'll be the first to admit I might be doing something wrong, but it seems that the full url is not used by default.

### Reproduction Steps

Repo with minimal example: https://github.com/ti83magic/ResiliencyTests

### Expected behavior

An attempted call using the full configured url:

Calls to these three endpoints in succession:

GET https://i-do-not-exist.io/aaaaaa/some-endpoint
GET https://nor-do-i.io/bbbbbb/some-endpoint
GET https://nor-i.io/cccccc/some-endpoint

### Actual behavior

Calls to these three endpoints in succession:

GET https://i-do-not-exist.io/aaaaaa/some-endpoint
GET https://nor-do-i.io/aaaaaa/some-endpoint
GET https://nor-i.io/aaaaaa/some-endpoint

### Regression?

_No response_

### Known Workarounds

_No response_

### Configuration

Using dotnet 8, with the following nugets:

```


```

Using the latest versions of these nugets does not seem to matter:

```



```

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.