aboutsummaryrefslogtreecommitdiff
path: root/nginx/ngx_http_js_module.c
Commit message (Collapse)AuthorAge
...
* Improved API for value creation from the outside of VM.Dmitry Volyntsev2019-02-21
|
* Style.Dmitry Volyntsev2019-02-14
|
* Replacing vsprintf with nxt_vsprintf in modules' exceptions API.Dmitry Volyntsev2019-02-12
|
* HTTP: skipping deleted elements while iterating over headers.Dmitry Volyntsev2019-02-07
|
* HTTP: added support for delete operation in r.headersOut.Dmitry Volyntsev2019-02-07
| | | | This closes #64 issue on Github.
* HTTP: improved setting empty headers.Dmitry Volyntsev2019-02-06
| | | | Treating empty value as deleting.
* HTTP: improved setting of special response headers.Dmitry Volyntsev2019-02-06
|
* Modules: reporting njs filenames in exceptions.Dmitry Volyntsev2019-02-06
|
* HTTP: setting default content type in sendHeader().Dmitry Volyntsev2019-02-05
|
* HTTP: removed response object deprecated in 0.2.2.Dmitry Volyntsev2019-01-28
|
* njs_vm_run() is rectified.Dmitry Volyntsev2018-12-28
| | | | | | | | | | | | Previously, both njs_vm_call() and njs_vm_run() can be used to run njs code. njs_vm_call() was used to invoke a single function, while njs_vm_run() was used to run global code as well to process the events. At first invocation njs_vm_run() executed global code, all the next invocations it processed pending events. The solution is splitting njs_vm_run() into two functions. One for events processing and another for running the global code.
* Fixed http response and parent getters.Dmitry Volyntsev2018-09-27
| | | | | Getters are expected to set resulting value to the provided argument, not to vm->retval.
* Fixed http status and contentType getter.Dmitry Volyntsev2018-09-19
| | | | | Getter are expected to set resulting value to provied argument, not to vm->retval.
* Allowing to create repeatable events.Dmitry Volyntsev2018-09-11
| | | | | njs_vm_add_event() prototype is extended to allow creating oneshot vs repeatable events.
* Fixed error code typo introduced in 5f00966ffff8.Dmitry Volyntsev2018-07-31
|
* Fixed applying call() to methods of external values.Dmitry Volyntsev2018-07-30
| | | | This correctly fixes #20 on Github.
* Restricted usage of r.subrequest() and r.parent.Dmitry Volyntsev2018-07-23
| | | | Thanks to 洪志道 (Hong Zhi Dao).
* Introduced nxt_length() macro.Valentin Bartenev2018-06-26
|
* http internalRedirect() method.Dmitry Volyntsev2018-06-13
| | | | | | | | Performs internal redirect to the specified uri. req.internalRedirect(<uri>): uri - string. If uri starts with '@' it is considered as a named location.
* Merged HTTP Response and Reply into Request.Dmitry Volyntsev2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | Splitting HTTP functionality into 3 objects Request, Response and Reply introduced a lot of confusion as to which method should belong to which object. New members of Request: - req.status (res.status) - req.parent (reply.parent) - req.requestBody (req.body) - req.responseBody (reply.body) - req.headersIn (req.headers) - req.headersOut (res.headers) - req.sendHeader() (res.sendHeader()) - req.send() (res.send()) - req.finish() (res.finish()) - req.return() (res.return()) Deprecated members of Request: - req.body (use req.requestBody or req.responseBody) - req.headers (use req.headersIn or req.headersOut) - req.response Response is remained in place for backward compatibility and will be removed in the following releases. Reply is replaced with Request in the req.subrequest() callback. The deprecated properties will be removed in the following releases.
* Using njs_vm_error() where appropriate.Dmitry Volyntsev2018-06-05
|
* Fixed the format specifier for ctx->status in debug log.Dmitry Volyntsev2018-05-30
|
* Added the debug for the returned status code in js_content.Dmitry Volyntsev2018-05-30
|
* Setting status code to 500 by default in js_content handler.Dmitry Volyntsev2018-05-30
| | | | This helps to debug incorrectly written content handlers.
* Improved logging for js_set and js_content directives.Dmitry Volyntsev2018-05-28
| | | | | Previously, unknown functions were reported under the debug log level which made the debugging of misconfigured directives harder.
* Fixed error logging in js_include.Dmitry Volyntsev2018-05-28
| | | | | | | Previously, ngx_log_error() was used instead of ngx_conf_log_error() in js_include directive handler. Replacing it with ngx_conf_log_error() to report the additional information about the location of the directive in the configuration file.
* Style.Roman Arutyunyan2018-05-14
|
* Moved njs vm to the main configuration.Roman Arutyunyan2018-04-17
| | | | | | Previously, vm and proto objects were located in the location (server for stream) configuration. Since there's only one instance of these objects, they are moved to the main configuration.
* Usage of njs_opaque_value_t is refactored in public API.Dmitry Volyntsev2018-05-04
|
* Renamed njscript to njs.Dmitry Volyntsev2018-05-03
| | | | | | njscript.c -> njs.c njscript.h -> njs.h njs.c -> njs_shell.c
* Added njs_core.hDmitry Volyntsev2018-04-27
|
* HTTP request body getter.Dmitry Volyntsev2018-04-09
| | | | Returns the client request body.
* Checking the number argument of HTTP return() method is valid.Dmitry Volyntsev2018-04-05
|
* HTTP response return() method.Roman Arutyunyan2018-04-02
| | | | | | | | | The method is a shortcut for finalizing an HTTP request and is similar to nginx return directive. res.return(code[, text]): code - numeric status code. text - response body or redirect URI (for 3xx responses).
* Removed excessive debug log for HTTP req.send().Dmitry Volyntsev2018-03-30
|
* Added additional log routines for different nginx log levels.Dmitry Volyntsev2018-03-29
| | | | warn(), error().
* Fixed copying of a garbage value.Dmitry Volyntsev2018-03-23
| | | | | | Found by Clang Static Analyzer. Additionally, unnecessary body_arg.length zeroing is removed.
* http subrequest() method.Dmitry Volyntsev2018-03-21
| | | | | | | | | | | | | | | | Creates an nginx's subrequest with the specified arguments and registers a finalization callback. req.subrequest(<uri>[, <options>[, <callback>]]): uri - string. options - string | object. string value - uri arguments. object value can contain: args, body, method all are string values. callback - function with the following argument: reply - the result object with the following properties: uri, method, status, contentType, contentLength, headers, args, body, parent.
* http req.response() method.Dmitry Volyntsev2018-03-21
|
* setTimeout() and clearTimeout() methods.Dmitry Volyntsev2018-03-21
| | | | | | | | Public methods are introduced to create and post async events for a VM instance. njs_vm_add_event() creates an async event for the VM to wait for. njs_vm_post_event() notifies the VM that the event occurred. If async events were added njs_vm_run() returns NJS_AGAIN until there are no remaining pending events.
* Skip empty buffers in HTTP response send().Roman Arutyunyan2018-02-28
| | | | Such buffers lead to send errors and should never be sent.
* Externals refactored.Dmitry Volyntsev2018-02-20
| | | | | | | | | | | | | Public API is rectified to allow the creation of external objects in runtime. 1) njs_vm_external_add() is replaced with njs_vm_external_prototype(). The later functions returns a pointer to a prototype object which can be used to create a value with such a prototype in runtime. 2) njs_vm_external() is split into njs_vm_external_create() and njs_vm_external_bind(). The former creates a variable with a specified prototype and associates it with an external pointer. The latter binds a variable to a name in the global namespace.
* Fixed using of internal NJS headers in nginx modules.Dmitry Volyntsev2018-02-12
| | | | | | | | | | | Public API is rectified to make it easier to work with the private structure njs_value_t from the outside: 1) njs_vm_retval() is split into njs_vm_retval() which now returns the njs_value_t * as a return value and njs_vm_value_to_ext_string() which stringifies an njs_value_t * passed as an argument. 2) njs_value_*_set() methods are added. 3) Similar public methods are grouped together.
* Enabling exception backtraces in nginx modules.Dmitry Volyntsev2017-11-17
|
* Fixed exception handling.Dmitry Volyntsev2017-11-17
| | | | | | | | | njs_vm_exception() is removed and combined with njs_vm_retval(). vm->exception is removed either, exceptions are now stored in vm->retval. It simplifies the client logic, because previously njs_vm_exception() had to be called if njs_vm_retval() fails. Additonally, stack traces are now appended to the retval if an exception happens.
* Interactive shell: console object.Dmitry Volyntsev2017-08-31
|
* Initialize njs_vm_opt_t structs to 0 to simplify options adding.Dmitry Volyntsev2017-07-17
|
* Passing all args to njs_vm_create() through njs_vm_opt_t struct.Dmitry Volyntsev2017-07-06
|
* Removed unused njs_vm_export_functions().Dmitry Volyntsev2017-06-28
|
* Style fixes and small miscellaneous changes.Igor Sysoev2017-06-27
|