mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
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
This commit is contained in:
parent
85c43024cb
commit
e16ab463d9
@ -946,6 +946,7 @@ esp_err_t esp_http_client_perform(esp_http_client_handle_t client)
|
|||||||
}
|
}
|
||||||
http_dispatch_event(client, HTTP_EVENT_ON_FINISH, NULL, 0);
|
http_dispatch_event(client, HTTP_EVENT_ON_FINISH, NULL, 0);
|
||||||
|
|
||||||
|
client->response->buffer->raw_len = 0;
|
||||||
if (!http_should_keep_alive(client->parser)) {
|
if (!http_should_keep_alive(client->parser)) {
|
||||||
ESP_LOGD(TAG, "Close connection");
|
ESP_LOGD(TAG, "Close connection");
|
||||||
esp_http_client_close(client);
|
esp_http_client_close(client);
|
||||||
|
Loading…
Reference in New Issue
Block a user