fix(esp_https_ota): handle invalid range condition for OTA resumption case

This commit is contained in:
Mahavir Jain
2025-01-23 10:25:53 +05:30
parent 5c5df89950
commit 89a96905c4
3 changed files with 31 additions and 0 deletions

View File

@@ -227,6 +227,7 @@ typedef enum {
HttpStatus_Unauthorized = 401,
HttpStatus_Forbidden = 403,
HttpStatus_NotFound = 404,
HttpStatus_RangeNotSatisfiable = 416,
/* 5xx - Server Error */
HttpStatus_InternalError = 500
@@ -242,6 +243,7 @@ typedef enum {
#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 */
#define ESP_ERR_HTTP_RANGE_NOT_SATISFIABLE (ESP_ERR_HTTP_BASE + 10) /*!< HTTP 416 Range Not Satisfiable, requested range in header is incorrect */
/**
* @brief Start a HTTP session