<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/src/nodejs, branch 1.35.0</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>node.js: Fixed issue with duplicate headers in response</title>
<updated>2025-05-28T16:27:04+00:00</updated>
<author>
<name>skokalin</name>
<email>sergey.kokalin@gmail.com</email>
</author>
<published>2025-05-28T13:47:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=9ae106730e28f89aed7987d40c9387057df4784e'/>
<id>9ae106730e28f89aed7987d40c9387057df4784e</id>
<content type='text'>
It fixes losing context in response in cases when there are 2 or more
headers with the same name.  The prev implementation used to use foreach
function which uses local lexical environment and did not find
this.headers_len locally, which causes crash of the http server module.

It was replaced with a for loop in order to make access for this.headers_len
variable and improve performance of calculation.

Closes: https://github.com/nginx/unit/issues/1621
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It fixes losing context in response in cases when there are 2 or more
headers with the same name.  The prev implementation used to use foreach
function which uses local lexical environment and did not find
this.headers_len locally, which causes crash of the http server module.

It was replaced with a for loop in order to make access for this.headers_len
variable and improve performance of calculation.

Closes: https://github.com/nginx/unit/issues/1621
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add additional replace rules for node:* modules</title>
<updated>2024-02-20T12:35:07+00:00</updated>
<author>
<name>Gabor Javorszky</name>
<email>g.javorszky@f5.com</email>
</author>
<published>2023-12-07T15:07:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d24ae5a9a4b1140695e027087e72dcfdeb484ec0'/>
<id>d24ae5a9a4b1140695e027087e72dcfdeb484ec0</id>
<content type='text'>
In that particular issue the compiled nuxt files end up importing the
http module as node:http rather than http only. This bypasses unit's
custom loader implementation which only check for the http or unit-http
modules, and their websocket counterparts.

This changeset adds replace sources for both the node:http and
node:websocket import signatures.

Closes: https://github.com/nginx/unit/issues/1013
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In that particular issue the compiled nuxt files end up importing the
http module as node:http rather than http only. This bypasses unit's
custom loader implementation which only check for the http or unit-http
modules, and their websocket counterparts.

This changeset adds replace sources for both the node:http and
node:websocket import signatures.

Closes: https://github.com/nginx/unit/issues/1013
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Node.js: Use console.warn instead of stderr.write</title>
<updated>2024-02-19T14:56:57+00:00</updated>
<author>
<name>Dan Callahan</name>
<email>d.callahan@f5.com</email>
</author>
<published>2024-02-19T12:22:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=756feafd541160e97edfb6faf13e9942271629ce'/>
<id>756feafd541160e97edfb6faf13e9942271629ce</id>
<content type='text'>
Functionally identical, but marginally more idiomatic.

Refines: fbeb2065b180e2376088387ee150d3975dc08cd5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Functionally identical, but marginally more idiomatic.

Refines: fbeb2065b180e2376088387ee150d3975dc08cd5
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: Take options as well as requestListener (#1091)</title>
<updated>2024-02-14T18:16:01+00:00</updated>
<author>
<name>Gabor Javorszky</name>
<email>g.javorszky@f5.com</email>
</author>
<published>2024-02-14T18:16:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=fbeb2065b180e2376088387ee150d3975dc08cd5'/>
<id>fbeb2065b180e2376088387ee150d3975dc08cd5</id>
<content type='text'>
* Take options as well as requestListener

Unit-http have not kept up with the signature of nodejs's http package
development. Nodejs allows an optional `options` object to be passed to
the `createServer` function, we didn't. This resulted in function
signature errors when user code that did make use of the options arg
tried to call unit's replaced function.

This change changes the signature to be more in line with how nodejs
does it discarding it and printing a message to stdout.

* Add test file to start node application with options

* Add changes to docs/changes.xml

Closes: https://github.com/nginx/unit/issues/1043</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Take options as well as requestListener

Unit-http have not kept up with the signature of nodejs's http package
development. Nodejs allows an optional `options` object to be passed to
the `createServer` function, we didn't. This resulted in function
signature errors when user code that did make use of the options arg
tried to call unit's replaced function.

This change changes the signature to be more in line with how nodejs
does it discarding it and printing a message to stdout.

* Add test file to start node application with options

* Add changes to docs/changes.xml

Closes: https://github.com/nginx/unit/issues/1043</pre>
</div>
</content>
</entry>
<entry>
<title>Node.js: fixed "httpVersion" variable format</title>
<updated>2024-01-26T15:17:00+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2024-01-25T12:49:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=6452ca111c71188ab2813c763e6a0e86b48fbd56'/>
<id>6452ca111c71188ab2813c763e6a0e86b48fbd56</id>
<content type='text'>
According to the Node.js documenation this variable
should only include numbering scheme.

Thanks to @dbit-xia.

Closes: https://github.com/nginx/unit/issues/1085
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to the Node.js documenation this variable
should only include numbering scheme.

Thanks to @dbit-xia.

Closes: https://github.com/nginx/unit/issues/1085
</pre>
</div>
</content>
</entry>
<entry>
<title>White space formatting fixes</title>
<updated>2024-01-16T15:37:07+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2024-01-16T15:37:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=a1e00b4e28d56365b4b5cc4aa44185c4b53f5c33'/>
<id>a1e00b4e28d56365b4b5cc4aa44185c4b53f5c33</id>
<content type='text'>
Closes: &lt;https://github.com/nginx/unit/pull/1062&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes: &lt;https://github.com/nginx/unit/pull/1062&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Node.js: ServerResponse.flushHeaders() implemented.</title>
<updated>2023-11-17T17:27:31+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2023-11-17T17:27:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=1443d623d4b5d59e4463e025b4125be9a5aa3436'/>
<id>1443d623d4b5d59e4463e025b4125be9a5aa3436</id>
<content type='text'>
This closes #1006 issue on GitHub.

Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This closes #1006 issue on GitHub.

Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Node.js: provide reasonable default paths for macOS.</title>
<updated>2023-09-26T23:14:21+00:00</updated>
<author>
<name>Konstantin Pavlov</name>
<email>thresh@nginx.com</email>
</author>
<published>2023-09-26T23:14:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=f1ce2a5ac2ba3266d525544445366fae538d7194'/>
<id>f1ce2a5ac2ba3266d525544445366fae538d7194</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Node.js: ServerRequest.destroy() implemented.</title>
<updated>2023-09-26T11:49:39+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2023-09-26T11:49:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=2d0e502d2a69ad490e0633c59636e1115afa983d'/>
<id>2d0e502d2a69ad490e0633c59636e1115afa983d</id>
<content type='text'>
This closes #871 issue on GitHub.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This closes #871 issue on GitHub.
</pre>
</div>
</content>
</entry>
<entry>
<title>Node.js: response body chunk can now be a Uint8Array.</title>
<updated>2023-09-26T11:49:39+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2023-09-26T11:49:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=e0c26757740fa7974af6e6592e35b5f2e00339fe'/>
<id>e0c26757740fa7974af6e6592e35b5f2e00339fe</id>
<content type='text'>
Starting from Node.js 15.0.0 the chunk parameter of the response.write()
can be a Uint8Array.

This closes #870 issue on GitHub.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Starting from Node.js 15.0.0 the chunk parameter of the response.write()
can be a Uint8Array.

This closes #870 issue on GitHub.
</pre>
</div>
</content>
</entry>
</feed>
