Skip to content

HTTPClient does not set/reset httpCode correctly to 200 but is stuck with 30X till followed too offten and gets 404 #4763

Closed
@DEvil0000

Description

@DEvil0000

What you are trying to do?
I try to follow https://github.com/wolf128058/esp32-led-matrix/releases/latest/download/version.txt to download it's payload.
Describe what is failing.
HTTPClient follows till the final URL but when it should have a 200 and return the payload it tries to follow once more and gets a 404 after that. Looks like the http return code is not reset when the HTTPClient gets reused internally on the follow.
Show the shortest possible code that will duplicate the error.

        http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
        http.begin(client, url);     // Webseite aufrufen

Hardware:

Board: ESP32 Dev Module
Core Installation version: 1.0.5-rc6
IDE name: Platform.io
Upload Speed: 115200
Computer OS: Ubuntu

Description:

guess I did that above.
Not reusing the connection (no follow) works.

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