mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
Merge branch 'bugfix/http_client_buffer_overread_v4.2' into 'release/v4.2'
esp_http_client: Fix buffer overread, update https_request example to use HTTP/1.1 (v4.2) See merge request espressif/esp-idf!12108
This commit is contained in:
@ -970,6 +970,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);
|
||||||
|
Reference in New Issue
Block a user