Skip to content

Infinite loop (or almost) with OctoprintApi::sendRequestToOctoprint()  #28

@fmatray

Description

@fmatray

Hello,
The the method OctoprintApi::sendRequestToOctoprint() seems, with some occasion, loop for ever or almost.

One of the occasion is with this answer (octoprint is down and Nginx is responding) :

HTTP/1.0 502 Bad Gateway
Cache-Control: no-cache
Connection: close
Content-Type: text/html

<html><body><h1>502 Bad Gateway</h1>
The server returned an invalid or incomplete response.
</body></html>

The code is waiting for a "Content-Length" that never happen.

What do you think about using ArduinoHttpClient instead of a custom code ?
https://github.com/arduino-libraries/ArduinoHttpClient

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions