Skip to content

Potential Bug for UTF-8 BOM strip #113

@zhongyi51

Description

@zhongyi51

According to the section 9.2.6 of SSE standard:

The UTF-8 decode algorithm strips one leading UTF-8 Byte Order Mark (BOM), if any.

However eventsource-client does not handle the leading BOM head now.

To fix this bug, we can introduce a flag first_chunk in EventParser. The parser will check and skip the BOM during parsing the first chunk.

If it is OK, I'm happy to submit a PR for this~

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