Worth a looka fix or feature you may want
HTTP clients enforce redirects, repair headers, and enable TLS 1.3
This calendar-day edition aligns response-header handling across WinINet, WinHTTP, Delphi HTTP and libcurl, then makes RedirectMax a real cap in the Windows and curl backends. WinHTTP also blocks HTTPS downgrades and enables TLS 1.3 on supported Windows releases. POSIX RunRedirect returns promptly after child exit, and ARM DoubleToAscii receives a targeted acceleration.
TL;DR
- Use build 2.4.17538 for the completed response-header, redirect and TLS sequence.
- WinINet, WinHTTP, Delphi HTTP and libcurl now expose cleaner final response headers.
- TWinHttp and TCurlHttp enforce RedirectMax, while WinHTTP rejects HTTPS-to-HTTP downgrades.
- WinHTTP enables TLS 1.3 on Windows 11 and Windows Server 2022 or newer.
- POSIX RunRedirect returns when the child exits instead of waiting for the full read delay.
Upgrade advice
Land on build 2.4.17538. Retest response-header enumeration in all four HTTP clients, redirect limits and HTTPS-to-HTTP rejection in WinHTTP and libcurl, TLS 1.3 negotiation on supported Windows releases, and process-launch code using RunRedirect on POSIX.
11 of 11 entries · 12 commits upstream
1
High
libcurl now exposes only the final response headers
TCurlHttp installs CurlWriteLastResponseHeader as its header callback. The callback clears the accumulated block whenever a new HTTP status line starts, then appends the current response headers.
Fixes
mormot.net.client
b9bdb628+16-3
net: fix TCurlHttp intermediate response headers
Impact
Redirects and other multi-response exchanges no longer leave intermediate headers mixed into TCurlHttp.Header; callers inspect the headers belonging to the final status code.
Upgrade recommended
Upgrade if TCurlHttp follows redirects or receives 100 Continue, and retest code that reads response headers.
Units
2
High
Windows request headers keep valid Unicode storage and clean names
TWinHttp.InternalAddHeader keeps the Utf8ToSynUnicode result in a local SynUnicode variable and passes its actual wide-character length. TDelphiNetHttp.InternalAddHeader trims header names and values separately.
Fixes
mormot.net.client
59a88c92+11-7
net: TWinHttp and TDelphiNetHttp client fixes
Impact
TWinHttp avoids a temporary-string pointer and UTF-8/wide-length mismatch, while Delphi's client no longer forwards surrounding whitespace in parsed custom headers.
Upgrade recommended
Retest non-ASCII and whitespace-padded custom request headers on TWinHttp and TDelphiNetHttp.
Units
3
High
Delphi HTTP header trimming compiles across supported compilers
TDelphiNetHttp.InternalAddHeader now writes TrimCopy results into explicit RawUtf8 variables before converting them to string for THTTPClient.AddHeader.
Compiler & platform
mormot.net.client
0a8341fb+8-5
net: fixed TDelphiNetHttp header trimming compilation
Impact
The previous inline use of the procedure-style TrimCopy overload could not compile; Delphi backends using TDelphiNetHttp build again without changing application code.
Upgrade recommended
Use build 2.4.17529 or later if TDelphiNetHttp is enabled.
Units
4
Medium
POSIX RunRedirect returns as soon as the child closes its pipe
WaitReadPending now treats EINTR as no data and documents negative results for HUP, ERR or NVAL without readable bytes. RunRedirect's RedirectOutput exits immediately on that negative result, and POSIX regression cases cover output, shell commands and exit codes.
Fixes
mormot.core.os+1
f2b61cbc+43-2
core: RunRedirect() on POSIX returns again as soon as the child exits
Impact
POSIX backends launching short-lived commands no longer wait until waitfordelayms expires after the child has exited. Signals interrupting poll are retried by the surrounding loop instead of being mistaken for a closed pipe.
Upgrade recommended
Upgrade POSIX services that call RunRedirect with a long waitfordelayms and verify command output plus exit-code handling.
5
Medium
WinINet and WinHTTP stop returning the HTTP status line as a header
RemoveHeadInHeaders trims whitespace and removes a leading HTTP status line. TWinHttpApi.InternalRetrieveAnswer and TCurlHttp both apply it before exposing or parsing response headers.
Fixes
mormot.net.client
e46374f3+21-12
net: fixed WinINet/WinHttp retrieved headers
Impact
Callers receive a normalized header block instead of a pseudo-header containing HTTP/1.x status text. Header lookups become consistent across Windows and curl clients.
Upgrade recommended
Retest code that parses the first line of response headers; it should now start with a real header field.
Units
6
Medium
WinHTTP enforces redirect counts and blocks HTTPS downgrades
TWinHttp.InternalSendRequest sets WINHTTP_OPTION_REDIRECT_POLICY to NEVER when RedirectMax is zero and to DISALLOW_HTTPS_TO_HTTP otherwise. It also passes RedirectMax to WINHTTP_OPTION_MAX_HTTP_AUTOMATIC_REDIRECTS and raises if either option cannot be applied.
Fixes
mormot.net.client
e37c4af5+16-9
net: honor RedirectMax and check redirect policy in TWinHttp
Impact
TWinHttp no longer follows more redirects than configured and will reject HTTPS-to-HTTP downgrades. Backends that relied on those downgrades or ignored option failures may observe request errors.
Worth a look
Retest TWinHttp callers with redirects, especially chains near RedirectMax and any endpoint that redirects from HTTPS to HTTP.
Units
7
Medium
libcurl follows no more redirects than RedirectMax allows
TCurlHttp.InternalCreateRequest still toggles coFollowLocation from RedirectMax, but now also sets libcurl coMaxRedirs to the configured positive value.
Fixes
mormot.net.client
5297eabb+6-3
net: honor RedirectMax in TCurlHttp
Impact
TCurlHttp now stops redirect chains at the framework setting instead of libcurl's own default maximum, making the option behave consistently across HTTP client backends.
Worth a look
Retest redirect-heavy TCurlHttp requests if RedirectMax differs from libcurl's default limit.
Units
8
Medium
WinHTTP enables TLS 1.3 on supported Windows releases
WindowsSpecs gains wsTls13 for Windows 11 and Windows Server 2022 or newer. TWinHttp.InternalGetProtocols adds WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3 when that capability is present, and SChannel reuses the same capability test.
New features
mormot.core.os+3
fe064e35+16-13
net: TWinHttp enable TLS 1.3 on Windows 11 or Server 2022
Impact
TWinHttp connections on supported Windows systems may negotiate TLS 1.3 without application changes. Older Windows versions retain the existing TLS protocol set.
Worth a look
Verify TLS negotiation and proxy compatibility on Windows 11 or Server 2022 if transport versions are operationally constrained.
Public API
TWindowsSpec.wsTls13added — Reports official TLS 1.3 support on Windows 11 and Windows Server 2022 or newer.
9
Low
DoubleToAscii uses native wide multiplication on ARM
The Grisu d2a_diy_fp_multiply path now uses ASMINTELARM and mul64x64 on ARMv7 and AArch64, and accesses the normalization word through PQWordArray.
Performance
mormot.core.text
0fe4797b+6-6
core: slightly faster DoubleToAscii() on arm32/aarch64
Impact
ARM Delphi and FPC backends format Double values with a faster internal multiply path; output format and public APIs do not change.
Units
10
Low
WinHTTP redirect setup is tidied and a merged regression test is removed
TWinHttp.InternalSendRequest moves the aData length assignment onto its own statement after the RedirectMax option call. The temporary RunRedirect regression method added through the merged contribution is removed from test.core.base.
Under the hood
mormot.net.client
e84e07fc+5-37
net: some refactoring after previous commits
Impact
No public API or intended runtime behavior changes. The WinHTTP code becomes clearer, while the short-lived POSIX regression coverage is no longer present in the test suite.
Units
11
Low
Project documentation refreshes contributors and compiler coverage
CONTRIBUTORS.md adds recent contributors. README.md replaces a fixed latest-Delphi claim with ongoing latest-revision wording, lists Delphi 13.2 validation and clarifies preliminary LLVM compiler support.
Docs
d17dfbfe+22-7
doc: refined main markdown files - especially the latest contributors! Thanks guys!
Impact
No application or runtime behavior changes. The documented validation matrix now includes Delphi 13.2 and more accurately describes Delphi cross-platform status.