Skip to content

Commit 82bd09b

Browse files
authored
Support HTTP 204
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.
1 parent 72a582b commit 82bd09b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libraries/HTTPUpdate/src/HTTPUpdate.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ HTTPUpdateResult HTTPUpdate::handleUpdate(HTTPClient &http, const String &curren
356356
log_e("Content-Length was 0 or wasn't set by Server?!\n");
357357
}
358358
break;
359+
case HTTP_CODE_NO_CONTENT:
359360
case HTTP_CODE_NOT_MODIFIED:
360361
///< Not Modified (No updates)
361362
ret = HTTP_UPDATE_NO_UPDATES;

0 commit comments

Comments
 (0)