From b8b104a8f0c5a71160fa0f71dc68d4d693f22ab0 Mon Sep 17 00:00:00 2001 From: Shubham Kulkarni Date: Thu, 8 Apr 2021 17:34:57 +0530 Subject: [PATCH] esp_https_ota: Fix counters for sending POST body Closes: https://github.com/espressif/esp-idf/issues/6844 --- components/esp_https_ota/src/esp_https_ota.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_https_ota/src/esp_https_ota.c b/components/esp_https_ota/src/esp_https_ota.c index 386fffd6b3..233e825c13 100644 --- a/components/esp_https_ota/src/esp_https_ota.c +++ b/components/esp_https_ota/src/esp_https_ota.c @@ -123,9 +123,9 @@ static esp_err_t _http_connect(esp_http_client_handle_t http_client) ESP_LOGE(TAG, "Write failed"); return ESP_FAIL; } + post_len -= write_len; + post_data += write_len; } - post_len -= write_len; - post_data += write_len; } header_ret = esp_http_client_fetch_headers(http_client); if (header_ret < 0) {