No matching definitions.

tur/httpd-compress

stdlib/httpd-compress.tur

gzip response compression middleware.

Since: Phase H8 (M6)

defn

httpd-mw-compress-step

(httpd-mw-compress-step [conn ptr<void> min-bytes : int] :)

internal: post-processing gzip pass.

Since: Phase H8 (M6)

defn

mw-compress-with

(mw-compress-with [min-bytes : int ^fat next : int] :)

gzip the response body when the client accepts gzip.

min-bytesminimum response body size to compress (typical: 256)
nextdownstream handler closure (fat-closure :int)

A wrapped handler closure (:ptr<void>) suitable for httpd-new / compose-middleware.

(compose-middleware base mw-log (mw-compress-with 256))

Since: Phase H8 (M6)

defn

mw-compress

(mw-compress [^fat next : int] :)

mw-compress-with default 256-byte threshold.

(compose-middleware base mw-log mw-compress)

Since: Phase H8 (M6)