[njs] HTTP: support for null as a second argument of r.subrequest().

Dmitry Volyntsev xeioex at nginx.com
Tue Jun 4 13:49:16 UTC 2019


details:   https://hg.nginx.org/njs/rev/deef19f6498a
branches:  
changeset: 999:deef19f6498a
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Tue Jun 04 16:07:14 2019 +0300
description:
HTTP: support for null as a second argument of r.subrequest().

This closes #173 issue on Github.

diffstat:

 nginx/ngx_http_js_module.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r f57cf6b5233a -r deef19f6498a nginx/ngx_http_js_module.c
--- a/nginx/ngx_http_js_module.c	Tue Jun 04 12:45:06 2019 +0300
+++ b/nginx/ngx_http_js_module.c	Tue Jun 04 16:07:14 2019 +0300
@@ -1808,7 +1808,7 @@ ngx_http_js_ext_subrequest(njs_vm_t *vm,
     } else if (njs_value_is_object(arg)) {
         options = arg;
 
-    } else if (!njs_value_is_undefined(arg)) {
+    } else if (!njs_value_is_null_or_undefined(arg)) {
         njs_vm_error(vm, "failed to convert args");
         return NJS_ERROR;
     }


More information about the nginx-devel mailing list