kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/http_client_buffer_overread' into 'master'
esp_http_client: Fix buffer overread, update https_request example to use HTTP/1.1 Closes IDFGH-4303 and IDFGH-4288 See merge request espressif/esp-idf!11864pull/6365/head
commit
2bfdd036b2
|
@ -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);
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
static const char *TAG = "example";
|
||||
|
||||
static const char *REQUEST = "GET " WEB_URL " HTTP/1.0\r\n"
|
||||
static const char *REQUEST = "GET " WEB_URL " HTTP/1.1\r\n"
|
||||
"Host: "WEB_SERVER"\r\n"
|
||||
"User-Agent: esp-idf/1.0 esp32\r\n"
|
||||
"\r\n";
|
||||
|
|
Ładowanie…
Reference in New Issue