mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(esp_http_client): detect oversized headers in tx buffer while sending request
This commit is contained in:
@@ -66,4 +66,16 @@ menu "ESP HTTP client"
|
||||
This config option helps in setting the maximum size of response header that
|
||||
can be saved in esp_http_client component.
|
||||
Note that the same size is used for key and value in the response headers.
|
||||
|
||||
config ESP_HTTP_CLIENT_STRICT_HEADER_BUFFER
|
||||
bool "Fail the request when a header does not fit in the tx buffer"
|
||||
default y
|
||||
help
|
||||
When enabled, esp_http_client_request_send() returns
|
||||
ESP_ERR_HTTP_HEADER_TOO_LONG if any individual header is larger than
|
||||
buffer_size_tx. With this option disabled, the legacy behavior is
|
||||
preserved: oversized headers are silently dropped and the request
|
||||
is emitted without its '\r\n\r\n' terminator, which typically
|
||||
results in the server timing out the connection. The strict check
|
||||
adds two small comparisons in the header send loop.
|
||||
endmenu
|
||||
|
||||
Reference in New Issue
Block a user