mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user