This release proceeds to extend the coverage of ECMAScript
Notable new features:
- Buffer object.
: >> var buf = Buffer.from([0x80,206,177,206,178])
: >> buf.slice(1).toString()
: >> buf.toString('base64')
- DataView object.
: >> (new DataView(buf.buffer)).getUint16()
You can learn more about njs:
- Overview and introduction: http://nginx.org/en/docs/njs/
- Presentation: https://youtu.be/Jc_L6UffFOs
- Using node modules with njs:
- Writing njs code using TypeScript definition files:
Feel free to try it and give us feedback on:
- Github: https://github.com/nginx/njs/issues
- Mailing list: http://mailman.nginx.org/mailman/listinfo/nginx-devel
Changes with njs 0.4.4
29 Sep 2020
*) Bugfix: fixed location merge.
*) Bugfix: fixed r.httpVersion for HTTP/2.
*) Feature: added support for numeric separators (ES12).
*) Feature: added remaining methods for %TypedArray%.prototype.
The following methods were added: every(), filter(), find(),
findIndex(), forEach(), includes(), indexOf(), lastIndexOf(),
map(), reduce(), reduceRight(), reverse(), some().
*) Feature: added %TypedArray% remaining methods.
The following methods were added: from(), of().
*) Feature: added DataView object.
*) Feature: added Buffer object implementation.
*) Feature: added support for ArrayBuffer in
*) Feature: added support for Buffer object in "crypto" methods.
*) Feature: added support for Buffer object in "fs" methods.
*) Change: Hash.prototype.digest() and Hmac.prototype.digest()
now return a Buffer instance instead of a byte string when
encoding is not provided.
*) Change: fs.readFile() and friends now return a Buffer instance
instead of a byte string when encoding is not provided.
*) Bugfix: fixed function "prototype" property handler while
*) Bugfix: fixed function "constructor" property handler while
*) Bugfix: fixed String.prototype.indexOf() for byte strings.
*) Bugfix: fixed RegExpBuiltinExec() with a global flag and
*) Bugfix: fixed RegExp.prototype[Symbol.replace] when the
replacement value is a function.
*) Bugfix: fixed TextDecoder.prototype.decode() with non-zero
Changes with nginx 1.19.3 29 Sep 2020
*) Feature: the ngx_stream_set_module.
*) Feature: the "proxy_cookie_flags" directive.
*) Feature: the "userid_flags" directive.
*) Bugfix: the "stale-if-error" cache control extension was erroneously
applied if backend returned a response with status code 500, 502,
503, 504, 403, 404, or 429.
*) Bugfix: "[crit] cache file ... has too long header" messages might
appear in logs if caching was used and the backend returned responses
with the "Vary" header line.
*) Workaround: "[crit] SSL_write() failed" messages might appear in logs
when using OpenSSL 1.1.1.
*) Bugfix: "SSL_shutdown() failed (SSL: ... bad write retry)" messages
might appear in logs; the bug had appeared in 1.19.2.
*) Bugfix: a segmentation fault might occur in a worker process when
using HTTP/2 if errors with code 400 were redirected to a proxied
location using the "error_page" directive.
*) Bugfix: socket leak when using HTTP/2 and subrequests in the njs