Runner now runs unfiltered; #error guard couples BASIC_AUTH to custom
transport configs; CMake include and REQUIRES cleanup; doc corrections and
tightened asserts from the final review.
Add max_write_chunk to the mock to force real short writes and fix its
capture ordering. Pin the open/write/fetch_headers/read sequence, short-write
retry, and the header read timeout (ESP_ERR_HTTP_FETCH_HEADER).
Enable BASIC_AUTH in both test configs (test-only). Pin the WWW-Authenticate
retry path, the credential-less 401 retry capped by max_authorization_retries,
and the independently gated preconfigured Basic auth.
Pin auto-follow inside one perform() call, disable_auto_redirect surfacing
the 302, and max_redirection_count tripping ESP_ERR_HTTP_MAX_REDIRECT (the
counter is checked before each redirect).
Add read_bytes_before_error to the mock (read-side truncation budget) so the
FIN lands inside a chunk body; pins decode output and
ESP_ERR_HTTP_INCOMPLETE_DATA on truncation.
Pin transport reuse across perform() calls, the Connection: close reconnect,
and the exact get_state() sequence seen from the event handler (the getter
lags its triggering events).
Pin async connect and read would-block retry paths, and that a would-block
on the initial header send aborts the request (close + ESP_ERR_HTTP_WRITE_DATA)
instead of retrying.
Mock TCP transport plus 13 basic cases that pin current client behavior.
Fixture Content-Length values corrected; all mock-based cases compile only
with CONFIG_ESP_HTTP_CLIENT_ENABLE_CUSTOM_TRANSPORT.
When CONFIG_ESP_HTTP_CLIENT_STRICT_HEADER_BUFFER is enabled,
esp_http_client_request_send() fails fast when a single request header is
larger than buffer_size_tx, instead of silently emitting a truncated request.
The condition is reported with a dedicated ESP_ERR_HTTP_HEADER_TOO_LONG error
code rather than overloading ESP_ERR_HTTP_WRITE_DATA, so callers can tell a
permanent header-sizing failure apart from a transient write error. errno is
cleared on this path so the async caller (which maps errno == EAGAIN to "retry
later") does not spin retrying a request that can never succeed.
Closes https://github.com/espressif/esp-idf/issues/18639
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit updated the client closing condition to avoid spurious
dispatching of event HTTP_EVENT_DISCONNECTED while closing closeed connection.
Closes https://github.com/espressif/esp-idf/issues/16070
Only pull in direct dependencies for the test apps, reducing build time
as well making it possible for CI to determine if the test should run or not
when dependencies are changed.