From b5c5655cf004858ed56f3488f006ebad3690c303 Mon Sep 17 00:00:00 2001 From: Kevin Sidwar Date: Wed, 4 Jun 2025 08:39:19 -0600 Subject: [PATCH] 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 --- libraries/HTTPUpdate/src/HTTPUpdate.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/HTTPUpdate/src/HTTPUpdate.cpp b/libraries/HTTPUpdate/src/HTTPUpdate.cpp index 1eda0a4f7..b463ffe2e 100644 --- a/libraries/HTTPUpdate/src/HTTPUpdate.cpp +++ b/libraries/HTTPUpdate/src/HTTPUpdate.cpp @@ -356,6 +356,7 @@ HTTPUpdateResult HTTPUpdate::handleUpdate(HTTPClient &http, const String ¤ 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;