History log of /unit/src/nodejs/unit-http/ (Results 1 – 25 of 55)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: 1.27.0-1, 1.27.0
2117:0e4bb7b44a6302-Jun-2022 Andrei Zeliankou

Node.js: fixed ES modules format in loader.mjs.

Before Node.js v16.14.0 the "format" value in defaultResolve
was ignored so error was hidden. For more information see:
https://github.com/nodejs/nod

Node.js: fixed ES modules format in loader.mjs.

Before Node.js v16.14.0 the "format" value in defaultResolve
was ignored so error was hidden. For more information see:
https://github.com/nodejs/node/pull/40980

show more ...

Revision tags: 1.26.1-1, 1.26.1, 1.26.0-1, 1.26.0
1980:43553aa7211128-Oct-2021 Max Romanov

Moving request limit control to libunit.

Introducting application graceful stop. For now only used when application
process reach request limit value.

This closes #585 issue on GitHub.

Revision tags: 1.25.0-1, 1.25.0
1898:7158c417a71115-Jun-2021 Max Romanov

Node.js: improving and test packaging.

The patch removes the "files" section from package.json to avoid future issues
with missing files. For package testing purposes, 'npm pack' is used instead
of

Node.js: improving and test packaging.

The patch removes the "files" section from package.json to avoid future issues
with missing files. For package testing purposes, 'npm pack' is used instead
of plain 'tar' to simulate packaging more accurately.

show more ...

1897:7dccbd380eb102-Jun-2021 Max Romanov

Node.js: packaging new loader.js and loader.mjs.

The files loader.js and loader.mjs (introduced in f85b85094541 and 3c551b9721df)
were added to the packaged files list.

Revision tags: 1.24.0-1, 1.24.0
1876:f85b8509454124-May-2021 Oisin Canty

Node.js: renamed "require_shim" to "loader".

1865:3c551b9721df12-May-2021 Oisin Canty

Node.js: a shim for overriding "http" and "websocket" modules.

Also added stubs for Server.address()
This was done to prevent crashes in some popular frameworks like express

Supports both CommonJS

Node.js: a shim for overriding "http" and "websocket" modules.

Also added stubs for Server.address()
This was done to prevent crashes in some popular frameworks like express

Supports both CommonJS and the new ES Modules system syntax e.g:

app.js:
const http = require('http')

app.mjs:
import http from "http"

Usage on Node 14.16.x and higher:
{
"type": "external",
"processes": {"spare": 0},
"working_directory": '/project',
"executable": "/usr/bin/env",
"arguments": [
"node",
"--loader",
"unit-http/require_shim.mjs"
"--require",
"unit-http/require_shim",
"app.js"
]
}

Usage on Node 14.15.x and lower:
{
"type": "external",
"processes": {"spare": 0},
"working_directory": '/project',
"executable": "/usr/bin/env",
"arguments": [
"node",
"--require",
"unit-http/require_shim",
"app.js"
]
}

show more ...


/unit/docs/changes.xml
http.js
http_server.js
require_shim.js
require_shim.mjs
/unit/test/node/404/app.js
/unit/test/node/basic/app.js
/unit/test/node/double_end/app.js
/unit/test/node/get_header_names/app.js
/unit/test/node/get_header_type/app.js
/unit/test/node/get_variables/app.js
/unit/test/node/has_header/app.js
/unit/test/node/header_name_case/app.js
/unit/test/node/header_name_valid/app.js
/unit/test/node/header_value_object/app.js
/unit/test/node/mirror/app.js
/unit/test/node/post_variables/app.js
/unit/test/node/promise_end/app.js
/unit/test/node/promise_handler/app.js
/unit/test/node/remove_header/app.js
/unit/test/node/require_shim/es_modules_http/app.mjs
/unit/test/node/require_shim/es_modules_http_indirect/app.js
/unit/test/node/require_shim/es_modules_http_indirect/module.mjs
/unit/test/node/require_shim/es_modules_websocket/app.mjs
/unit/test/node/require_shim/es_modules_websocket_indirect/app.js
/unit/test/node/require_shim/es_modules_websocket_indirect/module.mjs
/unit/test/node/require_shim/transitive_dependency/app.js
/unit/test/node/require_shim/transitive_dependency/transitive_http.js
/unit/test/node/require_shim/unit_http/app.js
/unit/test/node/set_header_array/app.js
/unit/test/node/status_message/app.js
/unit/test/node/update_header/app.js
/unit/test/node/variables/app.js
/unit/test/node/websockets/mirror/app.js
/unit/test/node/websockets/mirror_fragmentation/app.js
/unit/test/node/write_before_write_head/app.js
/unit/test/node/write_buffer/app.js
/unit/test/node/write_callback/app.js
/unit/test/node/write_multiple/app.js
/unit/test/node/write_return/app.js
/unit/test/test_node_application.py
/unit/test/test_node_es_modules.py
/unit/test/unit/applications/lang/node.py
/unit/test/unit/check/node.py
Revision tags: 1.23.0-1, 1.23.0
1831:da356521859a25-Mar-2021 Valentin Bartenev

Node.js: used distinct placeholder for version in "package.json".

This makes the "sed" instruction simpler and more portable, as the previous
variant didn't work well on BSD systems due to the "\s"

Node.js: used distinct placeholder for version in "package.json".

This makes the "sed" instruction simpler and more portable, as the previous
variant didn't work well on BSD systems due to the "\s" metacharacter.

Thanks to Sergey A. Osokin <osa@FreeBSD.org.ru> for spotting this issue.

Also, this should prevent accidentally creating a version 1.0.0 package.

show more ...

Revision tags: 1.22.0-1, 1.22.0
1767:582a004c73f829-Dec-2020 Max Romanov

Libunit: processing single port message.

This partially reverts the optimisation introduced in 1d84b9e4b459 to avoid an
unpredictable block in nxt_unit_process_port_msg(). Under high load, this
fun

Libunit: processing single port message.

This partially reverts the optimisation introduced in 1d84b9e4b459 to avoid an
unpredictable block in nxt_unit_process_port_msg(). Under high load, this
function may never return control to its caller, and the external event loop
(in Node.js and Python asyncio) won't be able to process other scheduled
events.

To reproduce the issue, two request processing types are needed: 'fast' and
'furious'. The 'fast' one simply returns a small response, while the 'furious'
schedules asynchronous calls to external resources. Thus, if Unit is subjected
to a large amount of 'fast' requests, the 'furious' request processing freezes
until the high load ends.

The issue was found by Wu Jian Ping (@wujjpp) during Node.js stream
implementation discussion and relates to PR #502 on GitHub.

show more ...

1766:9ec17030b67e29-Dec-2020 Max Romanov

Node.js: ServerRequest and ServerResponse compliance to Stream API.

ServerRequest now inherit stream Readable object. ServerResponse
provides 'writable' property.

Thanks to Wu Jian Ping (@wujjpp).

Node.js: ServerRequest and ServerResponse compliance to Stream API.

ServerRequest now inherit stream Readable object. ServerResponse
provides 'writable' property.

Thanks to Wu Jian Ping (@wujjpp).

This closes #274, closes #317 issues and closes #502 PR on GitHub.

show more ...

1731:43759e8fd1f607-Dec-2020 Max Romanov

Node.js: avoided use of request struct for debug logging.

This fixes a crash on exit of Node.js application. The crash reproduced
on Ubuntu 20.10 with Node.js v15.1.0. Tests 'test_node_websockets_

Node.js: avoided use of request struct for debug logging.

This fixes a crash on exit of Node.js application. The crash reproduced
on Ubuntu 20.10 with Node.js v15.1.0. Tests 'test_node_websockets_two_clients'
and 'test_node_websockets_7_13_1__7_13_2'.

The reason of the crash is using request struct which was already freed.

The issue was introduced in 5be509fda29e.

show more ...

1729:5be509fda29e30-Nov-2020 Max Romanov

Node.js: removing unnecessary warnings.

Warnings changed for debug messages.

Revision tags: 1.21.0-1, 1.21.0
1715:95874fd9750118-Nov-2020 Max Romanov

Libunit: closing active requests on quit.

Revision tags: 1.20.0-1, 1.20.0, 1.19.0-1, 1.19.0
1547:cbcd76704c9011-Aug-2020 Max Romanov

Introducing the shared application port.

This is the port shared between all application processes which use it to pass
requests for processing. Using it significantly simplifies the request
proces

Introducing the shared application port.

This is the port shared between all application processes which use it to pass
requests for processing. Using it significantly simplifies the request
processing code in the router. The drawback is 2 more file descriptors per each
configured application and more complex libunit message wait/read code.

show more ...

1543:42f27153db9111-Aug-2020 Max Romanov

Libunit refactoring: port management.

- Changed the port management callbacks to notifications, which e. g. avoids
the need to call the libunit function
- Added context and library instance referenc

Libunit refactoring: port management.

- Changed the port management callbacks to notifications, which e. g. avoids
the need to call the libunit function
- Added context and library instance reference counts for a safer resource
release
- Added the router main port initialization

show more ...

1536:8d151173475007-Aug-2020 Max Romanov

Node.js: correct port data memory release.

According to libuv documentation, uv_poll_t memory should be released
in a callback function passed to uv_close(). Otherwise, the Node.js application
proc

Node.js: correct port data memory release.

According to libuv documentation, uv_poll_t memory should be released
in a callback function passed to uv_close(). Otherwise, the Node.js application
process may crash at exit.

show more ...

Revision tags: 1.18.0-1, 1.18.0, 1.17.0-1, 1.17.0
1447:d1738674acc308-Apr-2020 Max Romanov

Node.js: fixing Server.listen() method.

This is required for Express framework compatibility.

This closes #418 issue on GitHub.

Revision tags: 1.16.0-1, 1.16.0
1373:65151d4ec48f03-Mar-2020 Max Romanov

Node.js: fixing x86 warning about the signed/unsigned comparison.

Revision tags: 1.15.0-1, 1.15.0
1342:f32913c6775228-Jan-2020 Max Romanov

Node.js: suppress compilation warning.

Revision tags: 1.14.0-1, 1.14.0
1322:a57afd02a57924-Dec-2019 Max Romanov

Node.js: implementing output message drain using SHM_ACK feature.

ServerResponse.write() method tries to write data buffer using libunit
and stores buffers to write in a Server-wide output queue, wh

Node.js: implementing output message drain using SHM_ACK feature.

ServerResponse.write() method tries to write data buffer using libunit
and stores buffers to write in a Server-wide output queue, which is
processed in response to SHM_ACK message from router.

As a side effect 'drain' event implemented and socket.writable flag
reflect current state.

show more ...

Revision tags: 1.13.0-1, 1.13.0
1257:00eea530513c11-Nov-2019 Max Romanov

Fixing libunit 'off by 2' issue in library.

Name and value in each header are 0-terminated, so additional 2 bytes
should be allocated for them. There were several attempts to add these
2 bytes to h

Fixing libunit 'off by 2' issue in library.

Name and value in each header are 0-terminated, so additional 2 bytes
should be allocated for them. There were several attempts to add these
2 bytes to headers in language modules, but some modules weren't updated.
Also, adding these 2 bytes is specific to the implementation which may be
changed later, so extending this mechanics to modules may cause errors.

show more ...

Revision tags: 1.12.0-1, 1.12.0, 1.11.0-2, 1.11.0-1, 1.11.0, 1.10.0-2, 1.10.0-1, 1.10.0
1132:9ac5b5f33ed920-Aug-2019 Max Romanov

Node.js: introducing websocket support.

1114:6d87da79ec4e06-Aug-2019 Valentin Bartenev

Node.js: returning "this" from writeHead() to allow chaining.

In Node.js version 11.10.0 and later, the writeHead() function returns "this".

1080:e38b21f9e94017-Jun-2019 Max Romanov

Node.js: packaging new nxt_napi.h.

File nxt_napi.h (introduced in 53533ba0097c) added into packaged files
list.

This closes #261 issue on GitHub.

Revision tags: 1.9.0-1, 1.9.0
1038:77fb332f214a17-Apr-2019 Max Romanov

Node.js: using low-case header names as key in req.headers.

Node.js modules (body-parser, row-body) search low-cased names
('content-length', 'content-type' etc.) to properly assemble request body.

Node.js: using low-case header names as key in req.headers.

Node.js modules (body-parser, row-body) search low-cased names
('content-length', 'content-type' etc.) to properly assemble request body.

This closes #246 issue on GitHub.

show more ...

1024:2f2fd179cda803-Apr-2019 Valentin Bartenev

Backed out changeset f74d4dd9c3db.

This closes #240 issue on GitHub.

123