Skip to content

When FollowRedirects=false, the returned ResponseUri value is incorrect. #2346

Closed

Description

@colindcli

Test code in RestSharp 113.1.0

var url = "https://cdn.tailwindcss.com/";
var req = new RestRequest(url);
var option = new RestClientOptions()
{
    FollowRedirects = false,
};
var client = new RestClient(option);
var res = await client.ExecuteAsync(req);
var responseUri = res.ResponseUri?.ToString();
Image Image

The responseUri value should be https://cdn.tailwindcss.com/3.4.17

Both .NET 4.6.2 and .NET 8.0 have the same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions