Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
.vscode/extensions.json
.github/copilot-instructions.md
AGENTS.md
CHANGELOG.md
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Changelog

All notable changes to this project are documented in this file.

## [Unreleased]
- (TBD)

## [2.1.2] - 2026-03-17
- Version bump and release metadata synchronization.

## [2.1.0] - 2026-02-26
- **Fix**: Use-after-free of `RequestContext` — transport callbacks now capture `shared_ptr<RequestContext>` instead of raw `void*` pointer, preventing dangling access after `cleanup()`.
- **Fix**: `handleData()` now checks `cancelled` flag at entry, matching `handleDisconnect`/`handleTransportError`.
- **Fix**: Race condition between `loop()` timeouts and AsyncTCP callbacks — `triggerError()` and `loop()` now check `atomic<bool> cancelled` before acting.
- **Fix**: `Content-Length` parsing uses `strtoul()` with `endptr` validation instead of `toInt()` (which returns 0 for invalid input).
- **Fix**: `Transfer-Encoding` multi-value support — `gzip, chunked` is now correctly detected via substring search instead of exact comparison.
- **Fix**: `setMaxBodySize()` is now enforced in streaming mode (`setNoStoreBody(true)`) to protect against unbounded data from malicious servers.
- **Perf**: Chunked transfer decoding eliminates double buffering — chunk body bytes are delivered directly from the incoming data buffer instead of being copied through `responseBuffer`.
- **Perf**: `_pendingQueue` changed from `std::vector` to `std::deque` for O(1) dequeue instead of O(n).
- **Feature**: `Content-Type` auto-detection for POST/PUT/PATCH — bodies starting with `{` or `[` default to `application/json`; user-set `Content-Type` headers take precedence.
- Internal: `_activeRequests` now uses `shared_ptr<RequestContext>` instead of `unique_ptr`.

## [2.0.0] - 2026-02-20
- **Breaking**: `SuccessCallback` now receives `std::shared_ptr<AsyncHttpResponse>`.
- **Breaking**: `request()` now takes `std::unique_ptr<AsyncHttpRequest>`.
- **Breaking**: `getBody()`, `getHeader()`, and `getStatusText()` return `String` by value.
- **Breaking**: removed legacy void-return helpers (`*_legacy`, `ASYNC_HTTP_LEGACY_VOID_API`).
- **Breaking**: `parseChunkSizeLine()` is now private.
- Normalize `HttpHeader` names to lowercase for faster lookups.
- Refactor request context state into sub-structs and store active/pending requests as `std::unique_ptr`.
- Document `BodyChunkCallback` lifetime guarantees.
- HTTPS/TLS transport: AsyncTCP + mbedTLS, CA/fingerprint/mutual-auth configuration, TLS error codes, and gated insecure TLS.
- Redirects: default safer cross-origin header forwarding, allow HTTP→HTTPS redirects.
- Cookies: host-only by default, allowlist required for parent-domain `Domain=` attributes.

## [1.0.7] - 2025-11-13
- Align `library.json`, `library.properties`, and `ESP_ASYNC_WEB_CLIENT_VERSION` with release 1.0.7 so CI/release scripts pass.
- Document contributor expectations in `AGENTS.md` and reconfirm README error codes plus HTTPS warning stay in sync with `HttpCommon.h`.
- Verified required Arduino/PlatformIO example skeletons for CI (SimpleGet, PostWithData, MultipleRequests, CustomHeaders, StreamingUpload, CompileTest) remain present.
14 changes: 10 additions & 4 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ESPAsyncWebClient",
"version": "2.1.1",
"version": "2.1.2",
"description": "Asynchronous HTTP client library for ESP32 ",
Comment on lines 1 to 4
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title ("Correct auto tag functionality") doesn’t match the actual changes here (version/metadata bump + formatting). This makes the intent of the release harder to track in history and automation; please align the title and/or PR description to reflect the version sync + changelog addition (or add the missing functional changes if they were intended).

Copilot uses AI. Check for mistakes.
"keywords": [
"http",
Expand All @@ -27,11 +27,17 @@
"name": "AsyncTCP",
"owner": "ESP32Async",
"version": "^3.4.8",
"platforms": ["espressif32"]
"platforms": [
"espressif32"
]
}
],
"frameworks": ["arduino"],
"platforms": ["espressif32"],
"frameworks": [
"arduino"
],
"platforms": [
"espressif32"
],
"export": {
"include": [
"src/*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESPAsyncWebClient
version=2.1.1
version=2.1.2
author=playmiel
maintainer=playmiel
sentence=Asynchronous HTTP client library for ESP32 microcontrollers
Expand Down
2 changes: 1 addition & 1 deletion src/HttpCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

// Library version (single source of truth inside code). Keep in sync with library.json and library.properties.
#ifndef ESP_ASYNC_WEB_CLIENT_VERSION
#define ESP_ASYNC_WEB_CLIENT_VERSION "2.1.1"
#define ESP_ASYNC_WEB_CLIENT_VERSION "2.1.2"
#endif

struct HttpHeader {
Expand Down
Loading