dotnet / dotnet/aspnetcore

RedirectHandler doesn't copy content for PATCH requests

Open
#58,270 0 comments 0 reactions 0 assignees View on GitHub
area-mvc feature-mvc-testing
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

RedirectHandler doesn't copy the body for patch requests which causes validation errors.

### Expected Behavior

Copy the body for any request that may contain a body.

### Steps To Reproduce

Use any version of `Microsoft.AspNetCore.Mvc.Testing` that's above or equal to `7.0.0` (the problem doesn't exist in earlier version).

### Exceptions (if any)

_No response_

### .NET Version

_No response_

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Locate RedirectHandler in Microsoft.AspNetCore.Mvc.Testing and reproduce the issue with a PATCH request whose body triggers validation errors. Confirm that requests capable of carrying a body preserve it through the redirect and that the validation error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.