Support HTTP 204 (#11408)

HTTP 204 is a successful return code which indicates No Content. While it's appropriate to return a 304 if the server has content for a device but it hasn't change, it is more accurate for a server to return a 204 if it simply doesn't have any firmware files for a particular device.

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
This commit is contained in:
Kevin Sidwar 2025-06-04 08:39:19 -06:00 committed by GitHub
parent 6f56df2a09
commit b5c5655cf0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -356,6 +356,7 @@ HTTPUpdateResult HTTPUpdate::handleUpdate(HTTPClient &http, const String &curren
log_e("Content-Length was 0 or wasn't set by Server?!\n");
}
break;
case HTTP_CODE_NO_CONTENT:
case HTTP_CODE_NOT_MODIFIED:
///< Not Modified (No updates)
ret = HTTP_UPDATE_NO_UPDATES;