esp_http_client.c: Clear raw_len for response buffer after dispatching HTTP_EVENT_ON_FINISH event

Closes: https://github.com/espressif/esp-idf/issues/6146
pull/6365/head
Shubham Kulkarni 2020-12-09 15:47:52 +05:30
rodzic 56cdf4268f
commit 6337ce9c3c
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -1027,6 +1027,7 @@ esp_err_t esp_http_client_perform(esp_http_client_handle_t client)
}
http_dispatch_event(client, HTTP_EVENT_ON_FINISH, NULL, 0);
client->response->buffer->raw_len = 0;
if (!http_should_keep_alive(client->parser)) {
ESP_LOGD(TAG, "Close connection");
esp_http_client_close(client);