Skip to content

Drawing images from URL (e.g. drawPngUrl) does not work if response is chunked #103

@Lazyuki

Description

@Lazyuki

Example: this png is returned with a Transfer-Encoding: chunked header and M5GFX can't render it with drawPngUrl.

This happens because each chunk in the tcp stream has a chunk-header (chunkLength\r\n) and a trailer (\r\n), but the drawImg##Url function does not take this into account so it thinks the stream is not a valid PNG and cannot render it. M5GFX should do something like https://github.com/espressif/arduino-esp32/blob/ee8931d151665ffc6bb52e3edb9509a6d8e5c401/libraries/HTTPClient/src/HTTPClient.cpp#L885-L934 to make sure images that get sent with chunks can be rendered.

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