aboutsummaryrefslogtreecommitdiff
path: root/nginx
Commit message (Collapse)AuthorAge
* Fixed NULL pointer dereference when processing If-* headers.Dmitry Volyntsev6 days
| | | | | | | | | | | | Previously, when processing requests with If-Match and If-Unmodified-Since headers worker process crashed. For example with the following code: try { r.return(200) } catch (e) { r.internalRedirect() } The fix is to disable not_modified filter as it was done in nginx perl module nginx/nginx@d9887ee2.
* Modules: fixed qjs engine after bellard/quickjs@458c34d2.Dmitry Volyntsev13 days
| | | | | | | | | | | | Object leaks: ADDRESS REFS SHRF PROTO CONTENT 0x512000007fc0 1 [module] nginx: quickjs.c:1967: JS_FreeRuntime: Assertion `list_empty(&rt->gc_obj_list)' failed. After bellard/quickjs@458c34d2 modules are treated as GC objects and tracked in rt->gc_obj_list. Intermediary module object loaded in ngx_qjs_clone() using JS_ReadObject() needed to be freed for proper ref_count accounting.
* Fetch: fixed handling of Content-Length header when body is provided.Dmitry Volyntsev2025-06-18
| | | | | | | | | | | | | | | | | | | | | | body value length takes precedence over Content-Length from header list. https://fetch.spec.whatwg.org/#http-network-or-cache-fetch Let contentLength be httpRequest’s body’s length, if httpRequest’s body is non-null; otherwise null. Let contentLengthHeaderValue be null. If httpRequest’s body is null and httpRequest’s method is `POST` or `PUT`, then set contentLengthHeaderValue to `0`. If contentLength is non-null, then set contentLengthHeaderValue to contentLength, serialized and isomorphic encoded. If contentLengthHeaderValue is non-null, then append (`Content-Length`, contentLengthHeaderValue) to httpRequest’s header list. This fixes #930 issue in Github.
* Tests: tuned periodic test for delays.Dmitry Volyntsev2025-06-13
|
* Removed NGX_MAX_PATH define.Orgad Shaneh2025-06-11
| | | | Already defined in ngx_files.h (included from ngx_core.h).
* QuickJS: added memory limit check for reuse queue.Dmitry Volyntsev2025-05-27
|
* Modules: added state file for the shared dictionary.Dmitry Volyntsev2025-05-22
| | | | | | | | | A new optional state parameter is added for js_shared_dict_zone directive. state parameter specifies a file that keeps the current state of the shared dict in the JSON format and makes it persistent across nginx restarts. This closes #709 feature request on Github.
* Modules: engine independent method to add entries to a shared dict.Dmitry Volyntsev2025-05-22
|
* Modules: replaced njs_str_t with ngx_str_t in the shared dictionary.Dmitry Volyntsev2025-05-22
| | | | | This is a preparatory patch for upcoming changes to unify common code for njs and QuickJS engines.
* Modules: introduced NGX_CHB_CTX_INIT().Dmitry Volyntsev2025-05-22
|
* Modules: separating different init worker components.Dmitry Volyntsev2025-05-22
|
* Tests: removed leftover engine checks.Dmitry Volyntsev2025-05-22
|
* Fetch: QuickJS support.Zhidao HONG2025-05-09
|
* Fetch: unify string type to support both njs and QuickJS.Zhidao HONG2025-05-09
|
* Fetch: separated ngx_js_http_* from ngx_js_fetch_*.Zhidao HONG2025-05-09
|
* Tests: fixed js_body_filter.t.Dmitry Volyntsev2025-05-01
| | | | | | The 1496ed3f commit made visible a problem with the fragile filter tests which depend on the exact sequence of data chunks. The fix is to use perl http server to ensure the order.
* Tests: improved js_body_filter.t tests.Dmitry Volyntsev2025-04-29
| | | | | | Dropping Content-Length header in locations where response body length is modified. This is not strictly needed for the test itself, but can serve as an example for a typical body modification task.
* Tests: fixed js_body_filter.t tests.Dmitry Volyntsev2025-04-29
| | | | Previously, '|' was used incorrectly in test match pattern.
* Refactored working with built-in strings, symbols and small integers.Vadim Zhestikov2025-04-29
| | | | | | | | | | | | | | | | - Implemented atom IDs for strings, symbols and small numbers, enabling equality checks via ID comparison - Optimized string operations for faster property lookups and comparisons - Removed short string inlining from njs_value_t structure Performance improvements (arewefastyet/benchmarks/v8-v7 benchmark): - Richards: +57% (631 → 989) - Crypto: +7% (1445 → 1551) - RayTrace: +37% (562 → 772) - NavierStokes: +20% (2062 → 2465) - Overall score: +29% (1014 → 1307) In collaboration with Dmitry Volyntsev.
* Replaced vm with mp in NJS_CHB_MP_INIT().Zhidao HONG2025-04-22
|
* Fetch: refactored out ngx_js_http_resolve().Zhidao HONG2025-04-11
|
* Fetch: refactored out ngx_js_http_close_peer().Zhidao HONG2025-04-11
|
* Fetch: refactored out ngx_js_http_resolve_done().Zhidao HONG2025-04-11
|
* Fetch: renamed njs_js_http_destructor() as ngx_js_http_destructor().Zhidao HONG2025-04-11
|
* Fetch: generalize ngx_js_http_error().Zhidao HONG2025-04-11
| | | | | Refactored to support both njs and QuickJS, which have different error formats when throwing exceptions.
* Fetch: remove unused parameter in ngx_js_http_error().Zhidao HONG2025-04-10
| | | | No functional changes.
* Fixed typo in stream event handler debug message.Dmitry Volyntsev2025-04-09
|
* QuickJS: ignoring rejected promises while destroying context.Dmitry Volyntsev2025-04-07
|
* QuickJS: added xml to nginx modules.Dmitry Volyntsev2025-04-03
| | | | Missed in cec9a1650.
* QuickJS: fix exception handling during configuration phase.Zhidao HONG2025-04-03
| | | | The issue was introduced in 9010aee (not released yet).
* QuickJS: fixed ngx_qjs_external_resolver().Zhidao HONG2025-03-30
|
* QuickJS: fixed compatibility issues with QuickJS-NG 0.9.0.Dmitry Volyntsev2025-03-27
| | | | This fixes #872 on Github.
* QuickJS: added missed JS_NewClass() for the SharedDictError class.hongzhidao2025-03-24
|
* QuickJS: calling njs_chb_destroy() in qjs_string_create_chb() internally.hongzhidao2025-03-19
| | | | No functional changes.
* QuickJS: fixed ngx_qjs_string() to handle strings containing "\0".hongzhidao2025-03-19
|
* QuickJS: making ngx_qjs_*() functions consistent with ngx_js_*().hongzhidao2025-03-18
|
* QuickJS: using helper to declare Symbol.toStringTag properties.Dmitry Volyntsev2025-02-25
|
* Fetch: accepting response headers with underscore characters.Dmitry Volyntsev2025-02-24
| | | | This fixes #856 on Github.
* Tests: making fetch test portable by removing njs.dump().Dmitry Volyntsev2025-02-24
|
* Modules: improved reporting of unhandled promise rejections.Dmitry Volyntsev2025-02-24
| | | | | | | | | | | | | | | | | | | Previously, some promise rejections were not reported. For example: async function timeout(ms) { return new Promise((resolve, reject) => { setTimeout(() => { reject(new Error('timeout')); }, ms); }); } async function handler(r) { let v = await timeout(1000); r.return(200); }
* Tests: splitting js_periodic tests into multiple files.Dmitry Volyntsev2025-02-20
|
* QuickJS: fixed memory leak in js_periodic handler.Dmitry Volyntsev2025-02-20
|
* QuickJS: fixed SharedDict.incr() with empty init argument.Dmitry Volyntsev2025-02-20
|
* QuickJS: fixed non-NULL terminated strings formatting in exceptions.Dmitry Volyntsev2025-02-18
| | | | | | | | | When "%*s" is specified, the first integer is interpreted as width. Width specifies *minimum* number of characters to output. The next string is expected to be NULL-terminated. When "%.*s" is specified, the first integer is interpreted as precision. Precision specifies *maximum* number of characters to output.
* Modules: fixed name corruption in variable and header processing.Dmitry Volyntsev2025-02-10
| | | | | | | | | The HTTP and Stream JS modules were performing in-place lowercasing of variable and header names, which could inadvertently overwrite the original data. In the NJS engine, the problem did not manifest itself for strings up to 14 bytes long because they are inlined into the value.
* QuickJS: fixed shared dict in stream module.Dmitry Volyntsev2025-02-07
| | | | The change was missed in 352c2e59 (0.8.8).
* HTTP: reading r.requestText or r.requestBuffer from a temp file.Dmitry Volyntsev2025-01-31
| | | | | | Previously, an exception was thrown when accessing r.requestText or r.requestBuffer if a client request body size exceeded client_body_buffer_size.
* QuickJS: added WebCrypto module.Dmitry Volyntsev2025-01-24
|
* QuickJS: added support for QuickJS-NG library.Dmitry Volyntsev2025-01-24
|
* QuickJS: correctly handling value len for empty query params.Dmitry Volyntsev2025-01-24
|