From acdf95232e776536084d07b92dfcf09c706544a3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:50:37 -0400 Subject: [PATCH] update reference.json (#273) Co-authored-by: ryepup <40441+ryepup@users.noreply.github.com> --- reference-lib/package-lock.json | 4 ++-- reference-lib/package.json | 2 +- reference-lib/src/reference.json | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/reference-lib/package-lock.json b/reference-lib/package-lock.json index 6bbc760..8db78d0 100644 --- a/reference-lib/package-lock.json +++ b/reference-lib/package-lock.json @@ -1,12 +1,12 @@ { "name": "@nginx/reference-lib", - "version": "1.1.3", + "version": "1.1.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@nginx/reference-lib", - "version": "1.1.3", + "version": "1.1.4", "license": "Apache-2.0", "devDependencies": { "@rollup/plugin-json": "^6.1.0", diff --git a/reference-lib/package.json b/reference-lib/package.json index dcd24ed..7e79aef 100644 --- a/reference-lib/package.json +++ b/reference-lib/package.json @@ -1,6 +1,6 @@ { "name": "@nginx/reference-lib", - "version": "1.1.3", + "version": "1.1.4", "description": "", "main": "dist/index.js", "type": "module", diff --git a/reference-lib/src/reference.json b/reference-lib/src/reference.json index 726ccad..c073afe 100644 --- a/reference-lib/src/reference.json +++ b/reference-lib/src/reference.json @@ -4678,8 +4678,8 @@ "
function
| module.function
[buffer_type
=string
| buffer
]
Sets an njs function as a response body filter.\nThe filter function is called for each data chunk of a response body\nwith the following arguments:
\n\nr
the HTTP request object
data
the incoming data chunk,\nmay be a string or Buffer\ndepending on the buffer_type
value,\nby default is a string.
flags
an object with the following properties:
\n\nlast
a boolean value, true if data is a last buffer.
The filter function can pass its own modified version\nof the input data chunk to the next body filter by calling\nr.sendBuffer()
.\nFor example, to transform all the lowercase letters in the response body:
function filter(r, data, flags) {\n r.sendBuffer(data.toLowerCase(), flags);\n}\n
\n\nTo stop filtering (following data chunks will be passed to client\nwithout calling js_body_filter
),\nr.done()
\ncan be used.
If the filter function changes the length of the response body, then\nit is required to clear out the “Content-Length” response header\n(if any) in\njs_header_filter
\nto enforce chunked transfer encoding.
\n\n" + "description_md": "Sets an njs function as a response body filter.\nThe filter function is called for each data chunk of a response body\nwith the following arguments:\n\n- `r`\n\n the [HTTP request](https://nginx.org/en/docs/njs/reference.html#http) object\n- `data`\n\n the incoming data chunk,\n may be a string or Buffer\n depending on the `buffer_type` value,\n by default is a string.\n Since [0.8.5](https://nginx.org/en/docs/njs/changes.html#njs0.8.5), the\n `data` value is implicitly converted to a valid UTF-8 string\n by default.\n For binary data, the `buffer_type` value\n should be set to `buffer`.\n- `flags`\n\n an object with the following properties:\n - `last`\n \n a boolean value, true if data is a last buffer.\n\nThe filter function can pass its own modified version\nof the input data chunk to the next body filter by calling\n[`r.sendBuffer()`](https://nginx.org/en/docs/njs/reference.html#r_sendbuffer).\nFor example, to transform all the lowercase letters in the response body:\n```\nfunction filter(r, data, flags) {\n r.sendBuffer(data.toLowerCase(), flags);\n}\n```\nTo stop filtering (following data chunks will be passed to client\nwithout calling `js_body_filter`),\n[`r.done()`](https://nginx.org/en/docs/njs/reference.html#r_done)\ncan be used.\n\nIf the filter function changes the length of the response body, then\nit is required to clear out the \"Content-Length\" response header\n(if any) in\n[`js_header_filter`](https://nginx.org/en/docs/http/ngx_http_js_module.html#js_header_filter)\nto enforce chunked transfer encoding.\n\n> As the `js_body_filter` handler\n> returns its result immediately, it supports\n> only synchronous operations.\n> Thus, asynchronous operations such as\n> [r.subrequest()](https://nginx.org/en/docs/njs/reference.html#r_subrequest)\n> or\n> [setTimeout()](https://nginx.org/en/docs/njs/reference.html#settimeout)\n> are not supported.\n\n> The directive can be specified inside the\n> [if](https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#if) block\n> since [0.7.7](https://nginx.org/en/docs/njs/changes.html#njs0.7.7).", + "description_html": "As the
\n\njs_body_filter
handler\nreturns its result immediately, it supports\nonly synchronous operations.\nThus, asynchronous operations such as\nr.subrequest()\nor\nsetTimeout()\nare not supported.The directive can be specified inside the\nif block\nsince 0.7.7.
\n
Sets an njs function as a response body filter.\nThe filter function is called for each data chunk of a response body\nwith the following arguments:
\n\nr
the HTTP request object
data
the incoming data chunk,\nmay be a string or Buffer\ndepending on the buffer_type
value,\nby default is a string.\nSince 0.8.5, the\ndata
value is implicitly converted to a valid UTF-8 string\nby default.\nFor binary data, the buffer_type
value\nshould be set to buffer
.
flags
an object with the following properties:
\n\nlast
a boolean value, true if data is a last buffer.
The filter function can pass its own modified version\nof the input data chunk to the next body filter by calling\nr.sendBuffer()
.\nFor example, to transform all the lowercase letters in the response body:
function filter(r, data, flags) {\n r.sendBuffer(data.toLowerCase(), flags);\n}\n
\n\nTo stop filtering (following data chunks will be passed to client\nwithout calling js_body_filter
),\nr.done()
\ncan be used.
If the filter function changes the length of the response body, then\nit is required to clear out the “Content-Length” response header\n(if any) in\njs_header_filter
\nto enforce chunked transfer encoding.
\n\n" }, { "name": "js_content", @@ -16456,5 +16456,5 @@ ] } ], - "version": "https://github.com/nginx/nginx.org/commit/2a84b6107338e8f3b8f1eb1862caf888ddde69bf" + "version": "https://github.com/nginx/nginx.org/commit/120efa0a24ae3e19529f7c94a11603699ced5472" }As the
\n\njs_body_filter
handler\nreturns its result immediately, it supports\nonly synchronous operations.\nThus, asynchronous operations such as\nr.subrequest()\nor\nsetTimeout()\nare not supported.The directive can be specified inside the\nif block\nsince 0.7.7.
\n