![]() This adds some new objects and helpers for keeping and logging info on grouped allocations, a group is, eg, SS handles or client wsis. Allocated objects get a context-unique "tag" string intended to replace %p / wsi pointers etc. Pointers quickly become confusing when allocations are freed and reused, the tag string won't repeat until you produce 2^64 objects in a context. In addition the tag string documents the object group, with prefixes like "wsi-" or "vh-" and contain object-specific additional information like the vhost name, address / port or the role of the wsi. At creation time the lws code can use a format string and args to add whatever group-specific info makes sense, eg, a wsi bound to a secure stream can also append the guid of the secure stream, it's copied into the new object tag and so is still available cleanly after the stream is destroyed if the wsi outlives it. |
||
---|---|---|
.. | ||
brotli | ||
deflate | ||
private-lib-roles-http-compression.h | ||
README.md | ||
stream.c |
HTTP compression
This directory contains generic compression transforms that can be applied to specifically HTTP content streams, after the header, be it h1 or h2.
The compression transforms expose an "ops" type struct and a compressor name
as used by content-encoding
... the ops struct definition can be found in
./private-lib-roles-http-compression.h.
Because the compression transform depends on being able to send on its output
before it can process new input, the transform adds a new kind of buflist
wsi->buflist_comp
that represents pre-compression transform data
("input data" from the perspective of the compression transform) that was
delivered to be processed but couldn't be accepted.
Currently, zlib 'deflate' and brotli 'br' are supported on the server side.