mORMot2 DailyDaily read of upstream commits

HTTP decompression gains output limits and clearer rejection responses

HTTP decoders receive an output limit and the socket servers distinguish malformed bodies, oversized payloads and spool write errors. FastCGI gains an optional front controller, while high-level web server types move into mormot.net.proxy. Custom decoder callbacks and imports may need source changes.

TL;DR

  • THttpSocketCompress callbacks must accept MaxSize and enforce it during decompression.
  • Take the zlib flush fix with the initial stream output-cap change.
  • High-level TWebServer types now come from mormot.net.proxy.
  • FastCgiIndex opts a FastCGI route into static-file serving and index fallback.

Upgrade advice

Evaluate the complete historical 2.4.18198 batch rather than the first MaxSize commit alone. Update custom THttpSocketCompress callbacks, replace EHttpSocketOverflow catches and import mormot.net.proxy for moved types. The payload lists no superseded_by links; this build identifies the day's snapshot, not a guarantee against later fixes.

Build2.4.18170 → 2.4.18198
Commits28
Lines+1823 -1000
Read4 min

24 of 24 entries · 28 commits upstream

Stories
# Entry Category Units
1 High HTTP compression callbacks must accept an output limit THttpSocketCompress gains MaxSize: PtrUInt; THttpRequestContext.UncompressData passes an in-memory limit to the registered decoder and checks the returned length too. Breaking changes mormot.net.http+1 22b53335+24-26

net: new THttpSocketCompress prototype definition

Impact

Custom Delphi/FPC callbacks must match the new type and honor the bound during decompression; a check after decoding cannot prevent peak allocation.

Migration required

Find custom THttpSocketCompress implementations and add MaxSize: PtrUInt; enforce nonzero limits in the decoder and test HTTP 413.

Public API

  • THttpSocketCompresssignature-changed
  • CompressShaAessignature-changed
  • THttpRequestContext.UncompressDatabehaviour-changed

Arnaud Bouchez · 14:10 UTC · view the commit on GitHub →

2 High Async HTTP reports decompression and storage failures separately The async request path rejects size overflows with 413, malformed compression with 400 and spool write failures with 507; the change also centralizes payload counters. Fixes mormot.net.async+2 4488f0d6+41-36

net: fixed async server error handling

Impact

Delphi/FPC backends can distinguish bad input from local storage trouble without routing a malformed body to the application handler.

Worth a look

Arnaud Bouchez · 14:59 UTC · view the commit on GitHub →

3 High Checked SynLZ decoding verifies data before returning it CompressSynLZ validates encoded input, checks the decoded size against MaxSize before allocation and uses a bounded decode plus an output hash check. Fixes mormot.core.base 6dc27f25+45-30

core: rewritten CompressSynLZ()

Impact

Delphi/FPC callers gain controlled failure on invalid data or size overflow. The later ESynLZ commit changes the class used for malformed data.

Worth a look

Public API

  • ESizeOverflowadded
  • CompressSynLZsignature-changed

Arnaud Bouchez · 14:05 UTC · view the commit on GitHub →

4 High The zlib stream limit is checked before output is written TZLib.DoFlush counts actual emitted bytes and raises ESizeOverflow before writing a chunk that would exceed MaxSize, including the final flush. Fixes mormot.lib.z beb1f0fd+10-10

lib: fixed MaxSize support in TZLib

Impact

Bounded decompression in Delphi/FPC no longer relies on the earlier zlib counter calculation; already written bytes are not rolled back.

Worth a look

Public API

  • TZLib.DoFlushsignature-changed

Arnaud Bouchez · 14:57 UTC · view the commit on GitHub →

5 Medium High-level web server types move into the proxy unit TWebServerGlobal, TWebServerLocal, their configuration types and associated declarations move from mormot.net.http to mormot.net.proxy. Breaking changes mormot.net.http+1 19300ad5+571-564

net: moved High Level Web Server Definitions to mormot.net.proxy

Impact

Delphi/FPC units that depended on the old import for these types must add mormot.net.proxy; lower-level HTTP types remain in mormot.net.http.

Migration required

Add mormot.net.proxy to uses where you reference TWebServerGlobal, TWebServerLocal or their configuration types, and update any unit-qualified references.

Public API

  • mormot.net.http.TWebServerGlobalremoved
  • mormot.net.proxy.TWebServerGlobaladded
  • mormot.net.http.TWebServerLocalremoved
  • mormot.net.proxy.TWebServerLocaladded
  • mormot.net.http.TWebServerBehaviorremoved
  • mormot.net.proxy.TWebServerBehavioradded

Arnaud Bouchez · 08:12 UTC · view the commit on GitHub →

6 Medium HTTP overflow handling switches to the shared size exception The HTTP unit removes EHttpSocketOverflow and raises ESizeOverflow for chunked size limits; server paths use it to identify oversized requests. Breaking changes mormot.net.http+1 7e1d8f43+29-36

net: replaced EHttpSocketOverflow by ESizeOverflow

Impact

Custom Delphi/FPC handlers naming the old class must update their catches; the server reports these request failures as HTTP 413.

Migration required

Replace catches of EHttpSocketOverflow with ESizeOverflow from mormot.core.base and verify your HTTP 413 handling.

Public API

  • EHttpSocketOverflowremoved
  • THttpSocket.GetBodybehaviour-changed

Arnaud Bouchez · 14:13 UTC · view the commit on GitHub →

7 Medium Accept throttling counts only work still queued TAsyncServer.DoExecute uses Pending rather than PendingCount for its accept throttle, excluding events that read workers already consumed. Fixes mormot.net.async cb118a65+120-1

net: TAsyncServer accept() should only count the pending events

Impact

The non-IOCP server avoids throttling new connections based on events that are no longer waiting.

Worth a look

zen010101 · 14:31 UTC · view the commit on GitHub →

8 Medium Blocking HTTP body failures clean up temporary streams THttpServerSocket.DownloadBody consolidates memory and stream retrieval, calls ProcessDone on failure and reports a stream write failure as 507. Fixes mormot.net.server 3d9eaad2+21-46

net: simplified THttpServerSocket body retrieval

Impact

Blocking Delphi/FPC servers clean up failed body spools rather than keeping them through request processing.

Arnaud Bouchez · 16:00 UTC · view the commit on GitHub →

9 Medium Gzip, deflate and zlib wrappers accept bounded decoding CompressGZip, CompressDeflate and CompressZLib add optional MaxSize; gzip checks the declared size and TGZRead.ToMem can raise a caller-selected exception on invalid output. Fixes mormot.core.zip d1463a9e+35-20

core: enhanced CompressGZip/CompressDeflate/CompressZLib

Impact

Delphi/FPC services can cap decoder output and should handle decoding exceptions for bad input rather than relying on the former failure result.

Worth a look

Public API

  • CompressGZipsignature-changed
  • CompressDeflatesignature-changed
  • CompressZLibsignature-changed
  • TGZRead.ToMemsignature-changed

Arnaud Bouchez · 14:08 UTC · view the commit on GitHub →

10 Medium Quoted include paths keep their hash character TPreproc.DoInclude recognizes comment markers only for unquoted paths; DoRegister checks the character before a marker when registering values. Fixes mormot.core.fmt a4225728+38-9

core: some TPreProc comments parsing fixes

Impact

Delphi/FPC configuration tooling can include filenames containing a quoted hash, and the regression cases preserve markers joined to macro values.

Worth a look

Arnaud Bouchez · 16:25 UTC · view the commit on GitHub →

11 Medium The common HTTP rejection body recognizes size overflow ComputeRejectBody takes an optional Exception, maps exact ESizeOverflow to 413 and includes exception-class context for other failures. Fixes mormot.net.server+1 8f3571e7+13-9

net: enhanced THttpServerSocketGeneric.ComputeRejectBody

Impact

Clients may see a more specific rejection status or a different HTML body; tests that match the exact body should account for it.

Worth a look

Arnaud Bouchez · 16:00 UTC · view the commit on GitHub →

12 Medium Async HTTP rejections share exception handling THttpAsyncServerConnection.DoReject accepts an exception and passes it to ComputeRejectBody; decompression errors now use that common route. Fixes mormot.net.async f4f43caa+7-12

net: refined THttpAsyncServer error handling

Impact

Async servers use the same rejection formatting and overflow classification as other socket HTTP paths.

Arnaud Bouchez · 16:01 UTC · view the commit on GitHub →

13 Medium Invalid SynLZ data gets a dedicated exception class CompressSynLZ now raises ESynLZ, an ExceptionWithProps subclass, for invalid input or output; ESizeOverflow still identifies a size limit. Fixes mormot.core.base+1 11be5249+9-7

core: new ESynLZ exception class

Impact

Delphi/FPC code catching EReadError specifically for CompressSynLZ must account for ESynLZ instead.

Worth a look

Public API

  • ESynLZadded
  • CompressSynLZbehaviour-changed

Arnaud Bouchez · 15:59 UTC · view the commit on GitHub →

14 Medium macOS async reads keep data reported with a close event TPollAsyncSockets.ProcessRead takes the immediate close branch only when pseClosed is present without pseRead. Fixes mormot.net.async 9d39b366+4-3

net: fixed TPollAsyncSockets.ProcessRead for MacOS

Impact

macOS async servers can process readable bytes when the poller reports both readability and closure in one notification.

Worth a look

Arnaud Bouchez · 08:15 UTC · view the commit on GitHub →

15 Medium Closing a FastCGI connection records its closed state TFastCgiAsyncConnection.OnClose calls the inherited method before attempting its fallback HTTP error response. Fixes mormot.net.proxy 99870a6c+3-2

net: TFastCgiAsyncConnection.OnClose did not call inherited OnClose

Impact

The inherited close marks the connection so destruction no longer invokes OnClose a second time on that path.

zen010101 · 11:55 UTC · view the commit on GitHub →

16 Medium FastCGI routes gain an optional front controller FastCgiIndex adds index-script fallback and static files for GET/HEAD. FastCgiAppendParams also accepts ScriptExt for matching script paths. New features mormot.net.proxy 29820f93+260-33

net: front controller support for fcgi:// Sources with THttpProxyUrlSettings.FastCgiIndex

Impact

Opt-in Delphi/FPC proxies can serve static assets or forward dynamic paths. The source directory must also be accessible to the proxy at the configured path.

Worth a look

Public API

  • THttpProxyUrlSettings.FastCgiIndexadded
  • FastCgiAppendParamssignature-changed

zen010101 · 08:14 UTC · view the commit on GitHub →

17 Medium Trusted in-process buffers get separate SynLZ helpers SynLZComp and SynLZDecomp expose raw compression and decompression using the internal SynLZ representation without the wrapper hashes. New features mormot.core.base d2777817+63-27

core: new SynLZDecomp/SynLZComp functions

Impact

Delphi/FPC code can use this pair for its own trusted buffers; SynLZDecomp does not validate hostile input and is not a replacement for checked decoding.

Worth a look

Public API

  • SynLZCompadded
  • SynLZDecompadded

Arnaud Bouchez · 14:03 UTC · view the commit on GitHub →

18 Medium Stream and string zlib decompression gain an optional size cap UncompressStream and the pointer overload of UncompressZipString add MaxSize; the POSIX caller separately clears invalid compressed info data on exception. New features mormot.lib.z+1 318bbaf8+18-11

lib: optional MaxSize parameter to stream decompression

Impact

Use the later TZLib.DoFlush correction with this new API so the bound is based on bytes actually produced.

Worth a look

Public API

  • UncompressStreamsignature-changed
  • UncompressZipStringsignature-changed

Arnaud Bouchez · 14:07 UTC · view the commit on GitHub →

19 Low NCrypt length errors use correctly formatted diagnostics TNCrypt.GetCardinal, GetBuffer and KeySign use integer format placeholders for unexpected lengths. Fixes mormot.lib.sspi c3c8d04f+5-5

lib: fixed some SSPI exception defintions

Impact

Windows Delphi/FPC applications receive corrected failure messages; successful cryptographic operations are unchanged.

Arnaud Bouchez · 14:04 UTC · view the commit on GitHub →

20 Low Windows socket peeking no longer overwrites the pending-byte count TCrtSocket.SockReceivePending passes a dedicated byte to recv with MSG_PEEK instead of passing the address of the count variable. Fixes mormot.net.sock d3941660+4-1

net: TCrtSocket.SockReceivePending on Windows peeks into a separate byte

Impact

On the Windows path the probe no longer writes into the byte-count variable it uses to report pending data.

zen010101 · 02:02 UTC · view the commit on GitHub →

21 Low Report pages use the lightweight in-memory SynLZ path TGdiPages uses SynLZComp and SynLZDecomp for internal metafile storage rather than the hash-bearing wrapper. Performance mormot.ui.report 0bbba74d+5-8

ui: optimized TGdiPages in-memory compression

Impact

This removes hash work for trusted report pages in memory; it does not change HTTP or database compression.

Arnaud Bouchez · 14:04 UTC · view the commit on GitHub →

22 Low FastCGI and local routes share static-file response logic The front controller decodes paths in TSynTempAdder and uses ReturnLocalFile, shared with OnGetHeadLocalFolder, to build the filename and cache key. Under the hood mormot.net.proxy a667f74e+71-49

net: front controller with TSynTempAdder, and ReturnLocalFile() shared with OnGetHeadLocalFolder

Impact

Pascal proxy deployments gain shared static-file handling without changing the FastCgiIndex setting introduced earlier.

zen010101 · 13:30 UTC · view the commit on GitHub →

23 Low Network slow-test names follow a consistent convention The suite renames the IOCP unsubscribe test, adjusts slow-test scheduling and clarifies a queue-count comment. Tests mormot.net.async 8c932950+7-9

tests: minor TNetworkProtocols refactoring

Impact

This changes tests and comments, not runtime accept behavior.

Arnaud Bouchez · 16:16 UTC · view the commit on GitHub →

24 Low Async response tests wait for cleanup once per group DoHttpAsyncResponses shortens the test delay and waits for the GC grace period once during the reset iterations rather than on every iteration. Tests b9be94ee+6-4

test: refine HttpAsyncResponse timing

Impact

Only test timing changes, not the production async connection lifetime.

Arnaud Bouchez · 07:53 UTC · view the commit on GitHub →

Upstream activity commits per day · last 60 days
Commits1007
Active days49/60
Busiest2026-09-30
Peak60
2026-09-30: 60 commits2026-10-01: 26 commits2026-10-02: 30 commits2026-10-03: 32 commits2026-10-04: 15 commits2026-10-05: 1 commit2026-10-06: 26 commits2026-10-07: 37 commits2026-10-08: 27 commits2026-10-09: 35 commits2026-10-10: 12 commits2026-10-11: 2 commits2026-10-12: 40 commits2026-10-13: 31 commits2026-10-14: 23 commits2026-10-15: 16 commits2026-10-16: 27 commits2026-10-17: 0 commits2026-10-18: 0 commits2026-10-19: 0 commits2026-10-20: 0 commits2026-10-21: 0 commits2026-10-22: 3 commits2026-10-23: 6 commits2026-10-24: 29 commits2026-10-25: 7 commits2026-10-26: 25 commits2026-10-27: 4 commits2026-10-28: 8 commits2026-10-29: 17 commits2026-10-30: 20 commits2026-10-31: 0 commits2026-11-01: 0 commits2026-11-02: 16 commits2026-11-03: 32 commits2026-11-04: 15 commits2026-11-05: 32 commits2026-11-06: 26 commits2026-11-07: 19 commits2026-11-08: 2 commits2026-11-09: 29 commits2026-11-10: 17 commits2026-11-11: 8 commits2026-11-12: 38 commits2026-11-13: 39 commits2026-11-14: 9 commits2026-11-15: 6 commits2026-11-16: 21 commits2026-11-17: 30 commits2026-11-18: 37 commits2026-11-19: 28 commits2026-11-20: 31 commits2026-11-21: 0 commits2026-11-22: 0 commits2026-11-23: 1 commit2026-11-24: 6 commits2026-11-25: 3 commits2026-11-26: 3 commits2026-11-27: 0 commits2026-11-28: 0 commits
2026-09-302026-11-28