| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Already defined in ngx_files.h (included from ngx_core.h).
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This is a preparatory patch for upcoming changes to unify common code
for njs and QuickJS engines.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Previously, '|' was used incorrectly in test match pattern.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Refactored to support both njs and QuickJS, which have different error
formats when throwing exceptions.
|
|
|
|
| |
No functional changes.
|
| |
|
| |
|
|
|
|
| |
Missed in cec9a1650.
|
|
|
|
| |
The issue was introduced in 9010aee (not released yet).
|
| |
|
|
|
|
| |
This fixes #872 on Github.
|
| |
|
|
|
|
| |
No functional changes.
|
| |
|
| |
|
| |
|
|
|
|
| |
This fixes #856 on Github.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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);
}
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The change was missed in 352c2e59 (0.8.8).
|
|
|
|
|
|
| |
Previously, an exception was thrown when accessing r.requestText or
r.requestBuffer if a client request body size exceeded
client_body_buffer_size.
|
| |
|
| |
|
| |
|