Skip to content

Ungzipping gzipped response from prerender service produces corrupted unicode strings #192

@ilyazolotarov

Description

@ilyazolotarov

This is where bad things happens - if chunk contains only part of unicode character then implicit Buffer.toString() produces corrupted string.

The fix will be to keep an array of chunks and then invoking Buffer.concat(chunks).toString() at the end.

Simple repro with hotfix

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