fix(esp_https_ota): handle ota resumption if server dosent support range requests

This commit added check to see if server supports range requets,
and fallback to OTA without resumption accordingly.

Closes https://github.com/espressif/esp-idf/pull/17960
This commit is contained in:
nilesh.kale
2026-02-11 14:40:35 +05:30
parent bf3d4f0dd9
commit 4e434f8eb8
4 changed files with 125 additions and 12 deletions
@@ -1864,6 +1864,17 @@ esp_err_t esp_http_client_close(esp_http_client_handle_t client)
return ESP_OK;
}
esp_err_t esp_http_client_clear_response_buffer(esp_http_client_handle_t client)
{
if (client == NULL) {
return ESP_ERR_INVALID_ARG;
}
if (client->response != NULL && client->response->buffer != NULL) {
esp_http_client_cached_buf_cleanup(client->response->buffer);
}
return ESP_OK;
}
esp_err_t esp_http_client_set_post_field(esp_http_client_handle_t client, const char *data, int len)
{
esp_err_t err = ESP_OK;