feat(esp_htttps_ota): handle case if server retured 304 not_modified during ota

This commit handles case for response code 304 (NOT_MODIFIED) during ota.

Closes https://github.com/espressif/esp-idf/issues/14839
This commit is contained in:
nilesh.kale
2024-11-11 14:24:00 +05:30
committed by Nilesh Kale
parent 1b44d4df3b
commit 0733de565f
4 changed files with 18 additions and 1 deletions
@@ -208,6 +208,7 @@ typedef enum {
HttpStatus_MovedPermanently = 301,
HttpStatus_Found = 302,
HttpStatus_SeeOther = 303,
HttpStatus_NotModified = 304,
HttpStatus_TemporaryRedirect = 307,
HttpStatus_PermanentRedirect = 308,
@@ -230,6 +231,7 @@ typedef enum {
#define ESP_ERR_HTTP_CONNECTING (ESP_ERR_HTTP_BASE + 6) /*!< HTTP connection hasn't been established yet */
#define ESP_ERR_HTTP_EAGAIN (ESP_ERR_HTTP_BASE + 7) /*!< Mapping of errno EAGAIN to esp_err_t */
#define ESP_ERR_HTTP_CONNECTION_CLOSED (ESP_ERR_HTTP_BASE + 8) /*!< Read FIN from peer and the connection closed */
#define ESP_ERR_HTTP_NOT_MODIFIED (ESP_ERR_HTTP_BASE + 9) /*!< HTTP 304 Not Modified, no update available */
/**
* @brief Start a HTTP session