Skip to content

text() does not strip UTF-8 BOM from HTTP response #72

Open
@rhargreaves

Description

@rhargreaves

Version: 0.2.4

We have an HTTP backend which adds a UTF-8 BOM to the start of HTTP responses. We noticed that it is present in the string returned by text(). It seems Node's own fetch() method have recently added a fix which strips out BOMs:

node-fetch/node-fetch#1482

Might be worth considering doing something similar? It doesn't feel right that text() returns a string which still contains a BOM. For now, we have made use of https://www.npmjs.com/package/strip-bom to remove the BOM from the string returned by text()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions