Skip to content

The dotnet-install scripts don't handle proxy-injected redirect responses #650

Closed

Description

@baronfel

See actions/setup-dotnet#650 for full context, content taken from #649.

The dotnet install scripts previously assumed every non-final HTTP status in the aka.ms redirect chain must be 301. Some proxies inject additional HTTP response blocks, such as "200 Connection Established", which caused valid redirect chains to be treated as broken.

As an example:

HTTP/1.1 301 Moved Permanently
Server: Kestrel
Location: https://aka.ms/dotnet/8.0/dotnet-sdk-linux-x64.tar.gz

HTTP/1.1 301 Moved Permanently
Server: Kestrel
Location: https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.411/dotnet-sdk-8.0.411-linux-x64.tar.gz

HTTP/1.1 200 Connection Established
Proxy-Agent: Zscaler/6.2

HTTP/1.1 200 OK
Content-Type: application/octet-stream
...
Content-Length: 216078119
Akamai-GRN: 0.e31e1602.1751887072.96833289

The current logic drops the final response code (presumably a 2xx/4xx/5xx), and then checks the remaining codes for anything that is not 301, assuming that indicates failure. However, in the above example there would still be a 200 at the end, resulting in an assumed redirect failure despite this actually being a success.

(@kalined I made this from your content because we like to have issues for tracking purposes - thank you for your PR!)

Activity

  1. added theissue type on Oct 29, 2025
  2. added
    Area: httpIssues related to incorrect handling of HTTP requests or responses
    and removed
    untriagedIssue is awaiting triage
    on Oct 29, 2025
  3. moved this from Backlog to In Progress in .NET Install Scriptson Oct 29, 2025
  4. MichaelSimons commented on Dec 2, 2025

    @MichaelSimons
    Member

    Re-opening until fix is releases.

  5. moved this from Done to Rollout in .NET Install Scriptson Dec 2, 2025
  6. moved this from Rollout to Done in .NET Install Scriptson Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: httpIssues related to incorrect handling of HTTP requests or responses

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions