Skip to content

Fetch fails with non-ascii Unicode (eg accented) characters in url  #233

@chrisveness

Description

@chrisveness

If a URL includes accented characters node-fetch returns 404 Not Found.

These work correctly using native fetch in Chrome Developer Tools.

Eg:

fetch('http://www.movable-type.co.uk/test/test.txt').then(response => console.log(response.status))

returns 200 in both DevTools and node repl.

However,

fetch('http://www.movable-type.co.uk/test/épreuve.txt').then(response => console.log(response.status))

returns 200 in DevTools, but 404 in node repl.

These example URLs can be used to replicate the issue.

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