Skip to content

Commit 2412a01

Browse files
authored
Merge pull request #22 from playmiel/dev
Correct auto tag functionality
2 parents 0d95317 + 0804dd2 commit 2412a01

5 files changed

Lines changed: 51 additions & 7 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@
55
.vscode/extensions.json
66
.github/copilot-instructions.md
77
AGENTS.md
8-
CHANGELOG.md

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Changelog
2+
3+
All notable changes to this project are documented in this file.
4+
5+
## [Unreleased]
6+
- (TBD)
7+
8+
## [2.1.2] - 2026-03-17
9+
- Version bump and release metadata synchronization.
10+
11+
## [2.1.0] - 2026-02-26
12+
- **Fix**: Use-after-free of `RequestContext` — transport callbacks now capture `shared_ptr<RequestContext>` instead of raw `void*` pointer, preventing dangling access after `cleanup()`.
13+
- **Fix**: `handleData()` now checks `cancelled` flag at entry, matching `handleDisconnect`/`handleTransportError`.
14+
- **Fix**: Race condition between `loop()` timeouts and AsyncTCP callbacks — `triggerError()` and `loop()` now check `atomic<bool> cancelled` before acting.
15+
- **Fix**: `Content-Length` parsing uses `strtoul()` with `endptr` validation instead of `toInt()` (which returns 0 for invalid input).
16+
- **Fix**: `Transfer-Encoding` multi-value support — `gzip, chunked` is now correctly detected via substring search instead of exact comparison.
17+
- **Fix**: `setMaxBodySize()` is now enforced in streaming mode (`setNoStoreBody(true)`) to protect against unbounded data from malicious servers.
18+
- **Perf**: Chunked transfer decoding eliminates double buffering — chunk body bytes are delivered directly from the incoming data buffer instead of being copied through `responseBuffer`.
19+
- **Perf**: `_pendingQueue` changed from `std::vector` to `std::deque` for O(1) dequeue instead of O(n).
20+
- **Feature**: `Content-Type` auto-detection for POST/PUT/PATCH — bodies starting with `{` or `[` default to `application/json`; user-set `Content-Type` headers take precedence.
21+
- Internal: `_activeRequests` now uses `shared_ptr<RequestContext>` instead of `unique_ptr`.
22+
23+
## [2.0.0] - 2026-02-20
24+
- **Breaking**: `SuccessCallback` now receives `std::shared_ptr<AsyncHttpResponse>`.
25+
- **Breaking**: `request()` now takes `std::unique_ptr<AsyncHttpRequest>`.
26+
- **Breaking**: `getBody()`, `getHeader()`, and `getStatusText()` return `String` by value.
27+
- **Breaking**: removed legacy void-return helpers (`*_legacy`, `ASYNC_HTTP_LEGACY_VOID_API`).
28+
- **Breaking**: `parseChunkSizeLine()` is now private.
29+
- Normalize `HttpHeader` names to lowercase for faster lookups.
30+
- Refactor request context state into sub-structs and store active/pending requests as `std::unique_ptr`.
31+
- Document `BodyChunkCallback` lifetime guarantees.
32+
- HTTPS/TLS transport: AsyncTCP + mbedTLS, CA/fingerprint/mutual-auth configuration, TLS error codes, and gated insecure TLS.
33+
- Redirects: default safer cross-origin header forwarding, allow HTTP→HTTPS redirects.
34+
- Cookies: host-only by default, allowlist required for parent-domain `Domain=` attributes.
35+
36+
## [1.0.7] - 2025-11-13
37+
- Align `library.json`, `library.properties`, and `ESP_ASYNC_WEB_CLIENT_VERSION` with release 1.0.7 so CI/release scripts pass.
38+
- Document contributor expectations in `AGENTS.md` and reconfirm README error codes plus HTTPS warning stay in sync with `HttpCommon.h`.
39+
- Verified required Arduino/PlatformIO example skeletons for CI (SimpleGet, PostWithData, MultipleRequests, CustomHeaders, StreamingUpload, CompileTest) remain present.

library.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ESPAsyncWebClient",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "Asynchronous HTTP client library for ESP32 ",
55
"keywords": [
66
"http",
@@ -27,11 +27,17 @@
2727
"name": "AsyncTCP",
2828
"owner": "ESP32Async",
2929
"version": "^3.4.8",
30-
"platforms": ["espressif32"]
30+
"platforms": [
31+
"espressif32"
32+
]
3133
}
3234
],
33-
"frameworks": ["arduino"],
34-
"platforms": ["espressif32"],
35+
"frameworks": [
36+
"arduino"
37+
],
38+
"platforms": [
39+
"espressif32"
40+
],
3541
"export": {
3642
"include": [
3743
"src/*",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESPAsyncWebClient
2-
version=2.1.1
2+
version=2.1.2
33
author=playmiel
44
maintainer=playmiel
55
sentence=Asynchronous HTTP client library for ESP32 microcontrollers

src/HttpCommon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

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

2323
struct HttpHeader {

0 commit comments

Comments
 (0)