Skip to content

fetch() keeps the original URL after redirects #5310

Description

@Monti-27

fetch() follows redirects, but the resulting Response still reports the original URL and redirected === false.

Repro against a local server that returns 302 Location: /target#frag:

const r = await fetch("http://127.0.0.1:8131/redirect");
console.log(r.redirected, r.url);

Current Boa:

  • false
  • http://127.0.0.1:8131/redirect

Expected:

  • true
  • http://127.0.0.1:8131/target

This matches Node and the Fetch spec for Response.redirected and Response.url.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions