# HG changeset patch # User Yaroslav Zhuravlev # Date 1625495546 -3600 # Node ID 42fb92e582db9f3624f248ac377e9b8c3f2c323e # Parent 438e5c551d678f3b6336fa41a3e298da7b90ffc1 Added note to js_set about asyncronous calls. diff -r 438e5c551d67 -r 42fb92e582db xml/en/docs/http/ngx_http_js_module.xml --- a/xml/en/docs/http/ngx_http_js_module.xml Thu Jul 01 11:27:14 2021 +0300 +++ b/xml/en/docs/http/ngx_http_js_module.xml Mon Jul 05 15:32:26 2021 +0100 @@ -9,7 +9,7 @@ + rev="29">
@@ -319,6 +319,19 @@ right before the request is freed. + + +As the js_set handler +returns its result immediately, it supports +only synchronous callbacks. +Thus, asynchronous callbacks such as +r.subrequest() +or +setTimeout() +are not supported. + + + diff -r 438e5c551d67 -r 42fb92e582db xml/en/docs/stream/ngx_stream_js_module.xml --- a/xml/en/docs/stream/ngx_stream_js_module.xml Thu Jul 01 11:27:14 2021 +0300 +++ b/xml/en/docs/stream/ngx_stream_js_module.xml Mon Jul 05 15:32:26 2021 +0100 @@ -9,7 +9,7 @@ + rev="28">
@@ -280,6 +280,19 @@ right before the request is freed. + + +As the js_set handler +returns its result immediately, it supports +only synchronous callbacks. +Thus, asynchronous callbacks such as +ngx.fetch() +or +setTimeout() +are not supported. + + + diff -r 438e5c551d67 -r 42fb92e582db xml/ru/docs/http/ngx_http_js_module.xml --- a/xml/ru/docs/http/ngx_http_js_module.xml Thu Jul 01 11:27:14 2021 +0300 +++ b/xml/ru/docs/http/ngx_http_js_module.xml Mon Jul 05 15:32:26 2021 +0100 @@ -9,7 +9,7 @@ + rev="29">
@@ -320,6 +320,19 @@ непосредственно перед освобождением запроса. + + +Так как обработчик js_set +должен сразу возвращать результат, +то поддерживаются только синхронные вызовы, +Таким образом, асинхронные вызовы, например +r.subrequest() +или +setTimeout(), +не поддерживаются. + + + diff -r 438e5c551d67 -r 42fb92e582db xml/ru/docs/stream/ngx_stream_js_module.xml --- a/xml/ru/docs/stream/ngx_stream_js_module.xml Thu Jul 01 11:27:14 2021 +0300 +++ b/xml/ru/docs/stream/ngx_stream_js_module.xml Mon Jul 05 15:32:26 2021 +0100 @@ -9,7 +9,7 @@ + rev="28">
@@ -281,6 +281,19 @@ непосредственно перед освобождением запроса. + + +Так как обработчик js_set +должен сразу возвращать результат, +то поддерживаются только синхронные вызовы. +Таким образом, асинхронные вызовы, например +ngx.fetch() +или +setTimeout(), +не поддерживаются. + + +