diff xml/en/docs/http/ngx_http_js_module.xml @ 2787:005b056c267f

Added note about async calls for js_body_filter, js_header_filter.
author Yaroslav Zhuravlev <yar@nginx.com>
date Thu, 21 Oct 2021 15:11:56 +0100
parents 65591dd31d64
children 652356b39f0f
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_js_module.xml
+++ b/xml/en/docs/http/ngx_http_js_module.xml
@@ -9,7 +9,7 @@
 <module name="Module ngx_http_js_module"
         link="/en/docs/http/ngx_http_js_module.html"
         lang="en"
-        rev="32">
+        rev="33">
 
 <section id="summary">
 
@@ -213,6 +213,19 @@ it is required to clear out the <header>
 to enforce chunked transfer encoding.
 </para>
 
+<para>
+<note>
+As the <literal>js_body_filter</literal> handler
+returns its result immediately, it supports
+only synchronous operations.
+Thus, asynchronous operations such as
+<link doc="../njs/reference.xml" id="r_subrequest">r.subrequest()</link>
+or
+<link doc="../njs/reference.xml" id="settimeout">setTimeout()</link>
+are not supported.
+</note>
+</para>
+
 </directive>
 
 
@@ -321,6 +334,19 @@ Sets an njs function as a response heade
 The directive allows changing arbitrary header fields of a response header.
 </para>
 
+<para>
+<note>
+As the <literal>js_header_filter</literal> handler
+returns its result immediately, it supports
+only synchronous operations.
+Thus, asynchronous operations such as
+<link doc="../njs/reference.xml" id="r_subrequest">r.subrequest()</link>
+or
+<link doc="../njs/reference.xml" id="settimeout">setTimeout()</link>
+are not supported.
+</note>
+</para>
+
 </directive>
 
 
@@ -430,8 +456,8 @@ right before the request is freed.
 <note>
 As the <literal>js_set</literal> handler
 returns its result immediately, it supports
-only synchronous callbacks.
-Thus, asynchronous callbacks such as
+only synchronous operations.
+Thus, asynchronous operations such as
 <link doc="../njs/reference.xml" id="r_subrequest">r.subrequest()</link>
 or
 <link doc="../njs/reference.xml" id="settimeout">setTimeout()</link>