Open imzlh opened 2 months ago
Hi @imzlh,
Can you please minimize the code so I can reproduce the issue? Also please share the minimal nginx.conf.
minal version:
js_import /usr/local/osgi/lib/nginx/vlist.js;
location = /@api/{
js_var $authkey "....";
js_content vlist.main;
}
return h.return(200, JSON.stringify(res));
Describe the bug
When I try to send a long string(JSON.stringify), the browser reports an error
To reproduce
Steps to reproduce the behavior:
NJS: Here: https://github.com/imzlh/vlist-njs/blob/master/main.ts#L429
CURL:
Expected behavior
Complete JSON string
Your environment
-prefix=/usr/local/osgi/ --sbin-path=bin/ --modules-path=lib/nginx/ --conf-path=etc/nginx/nginx.conf --error-log-path=/tmp/nginx/error.log --pid-path=/tmp/nginx/.pid --lock-path=/tmp/nginx/.lock --user=daemon --group=daemon --build='for ARMRounger' --without-poll_module --without-http_ssi_module --without-http_userid_module --without-http_mirror_module --without-http_geo_module --without-http_map_module --without-http_split_clients_module --without-http_uwsgi_module --without-http_grpc_module --without-http_memcached_module --without-http_empty_gif_module --without-http_browser_module --without-http_upstream_hash_module --without-http_upstream_ip_hash_module --without-http_upstream_least_conn_module --without-http_upstream_random_module --without-http_upstream_keepalive_module --without-http_upstream_zone_module --http-log-path=/tmp/nginx/log.log --http-client-body-temp-path=/tmp/nginx/body --http-proxy-temp-path=/tmp/nginx/proxy --http-fastcgi-temp-path=/tmp/nginx/fcgi --http-scgi-temp-path=/tmp/nginx/scgi --with-cc=armv7m-linux-musleabi-gcc --with-cpp=armv7m-linux-musleabi-gcc-g++ --add-module=../njs/nginx/ --add-module=dav --with-http_dav_module --with-zlib=../zlib-1.3.1 --with-http_v2_module --with-http_v3_module --add-module=fancyindex --with-ld-opt='-static -s -w'
Linux 4.1.25 #3 SMP PREEMPT Fri Apr 7 01:40:44 UTC 2023 armv7l GNU/Linux