Merge branch 'bugfix/esp_http_client_read_v4.2' into 'release/v4.2'

Fix esp_http_client_read for file size aligned to 289 bytes (v4.2)

See merge request espressif/esp-idf!13306
This commit is contained in:
Mahavir Jain 2021-05-03 13:36:51 +00:00
commit 0f0cfb2cbc

View File

@ -898,7 +898,7 @@ int esp_http_client_read(esp_http_client_handle_t client, char *buffer, int len)
}
ESP_LOG_LEVEL(sev, TAG, "esp_transport_read returned:%d and errno:%d ", rlen, errno);
}
if (rlen < 0 && ridx == 0) {
if (rlen < 0 && ridx == 0 && !esp_http_client_is_complete_data_received(client)) {
return ESP_FAIL;
} else {
return ridx;