Skip to content

Commit 9995e19

Browse files
authored
Merge branch 'main' into patch-1
2 parents dc79564 + 5e88701 commit 9995e19

18 files changed

+193
-77
lines changed

source/CHANGES.txt

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,66 @@
11

2+
Changes with Unit 1.32.1 26 Mar 2024
3+
4+
*) Bugfix: NJS variables in templates may have incorrect values due to
5+
improper caching.
6+
7+
*) Bugfix: Wasm application process hangs after receiving restart signal
8+
from the control.
9+
10+
11+
Changes with Unit 1.32.0 27 Feb 2024
12+
13+
*) Feature: WebAssembly Components using WASI interfaces defined in
14+
wasi:http/proxy@0.2.0.
15+
16+
*) Feature: conditional access logging.
17+
18+
*) Feature: NJS variables access.
19+
20+
*) Feature: $request_id variable contains a string that is formed using
21+
random data and can be used as a unique request identifier.
22+
23+
*) Feature: options to set control socket permissions.
24+
25+
*) Feature: Ruby arrays in response headers, improving compatibility
26+
with Rack v3.0.
27+
28+
*) Feature: Python bytearray response bodies for ASGI applications.
29+
30+
*) Bugfix: router could crash while sending large files. Thanks to
31+
rustedsword.
32+
33+
*) Bugfix: serving static files from a network filesystem could lead to
34+
error.
35+
36+
*) Bugfix: "uidmap" and "gidmap" isolation options validation.
37+
38+
*) Bugfix: abstract UNIX socket name could be corrupted during
39+
configuration validation. Thanks to Alejandro Colomar.
40+
41+
*) Bugfix: HTTP header field value encoding could be misinterpreted in
42+
Python module.
43+
44+
*) Bugfix: Node.js http.createServer() accepts and ignores the "options"
45+
argument, improving compatibility with strapi applications, among
46+
others.
47+
48+
*) Bugfix: ServerRequest.flushHeaders() implemented in Node.js module to
49+
make it compatible with Next.js.
50+
51+
*) Bugfix: ServerRequest.httpVersion variable format in Node.js module.
52+
53+
*) Bugfix: Node.js module handles standard library imports prefixed with
54+
"node:", making it possible to run newer Nuxt applications, among
55+
others.
56+
57+
*) Bugfix: Node.js tarball location changed to avoid build/install
58+
errors.
59+
60+
*) Bugfix: Go module sets environment variables necessary for building
61+
on macOS/arm64 systems.
62+
63+
264
Changes with Unit 1.31.1 19 Oct 2023
365

466
*) Feature: allow to set the HTTP response status in Wasm module.

source/community.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Contribution
2323
************
2424

2525
NGINX Unit is released under the
26-
`Apache 2.0 license <https://hg.nginx.org/unit/file/tip/LICENSE>`_;
26+
`Apache 2.0 license <https://github.com/nginx/unit/blob/master/LICENSE>`_;
2727
we maintain GitHub
2828
`repos <https://github.com/nginx>`_.
2929

source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
project = 'NGINX Unit'
66
author = 'NGINX, Inc.'
77
copyright = '2017-2024'
8-
version = '1.32.0'
9-
release_date = 'Feb 27, 2024'
8+
version = '1.32.1'
9+
release_date = 'Mar 26, 2024'
1010
release = version
1111
needs_sphinx = '6.2'
1212

source/configuration.rst

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5025,31 +5025,21 @@ you have:
50255025
.. list-table::
50265026
:header-rows: 1
50275027
5028-
* - Option
5029-
- Description
5030-
5031-
* - **script** (required)
5032-
- String;
5033-
rack script pathname,
5034-
including the **.ru** extension,
5035-
for instance:
5036-
**/www/rubyapp/script.ru**.
5028+
* - Option
5029+
- Description
50375030
5038-
* - **hooks**
5039-
- String;
5040-
pathname of the **.rb** file
5041-
setting the event hooks
5042-
invoked during the app's lifecycle.
5031+
* - **script** (required)
5032+
- String; rack script pathname, including the **.ru** extension,
5033+
for instance: **/www/rubyapp/script.ru**.
50435034
5044-
* - **threads**
5045-
- Integer;
5046-
number of worker threads
5047-
per :ref:`app process <sec-processes>`.
5048-
When started,
5049-
each app process creates this number of threads
5050-
to handle requests.
5035+
* - **hooks**
5036+
- String; pathname of the **.rb** file setting the event hooks invoked
5037+
during the app's lifecycle.
50515038
5052-
The default is **1**.
5039+
* - **threads**
5040+
- Integer; number of worker threads per
5041+
:ref:`app process <sec-processes>`. When started, each app process
5042+
creates this number of threads to handle requests. The default is **1**.
50535043
50545044
Example:
50555045
@@ -5637,7 +5627,7 @@ recorded. The **if** option supports a string and JavaScript code.
56375627
If its value is empty, 0, false, null, or undefined, the logs will not be
56385628
recorded. And the '!' as a prefix inverses the condition.
56395629
5640-
Example without NJS:
5630+
Example without njs:
56415631
56425632
.. code-block:: json
56435633
@@ -5663,7 +5653,7 @@ We can add ! to inverse the condition.
56635653
56645654
Now, all requests without a session cookie will be logged.
56655655
5666-
Example with NJS and the use of a template literal:
5656+
Example with njs and the use of a template literal:
56675657
56685658
.. code-block:: json
56695659

source/exts/github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
layout.html:
1010
{% if edit_on_github_url %}
1111
<div class="nxt_github_link">
12-
<a href="{{ edit_on_github_url }}"><div></div>Improve this page</a>
12+
<a href="{{ edit_on_github_url }}"><div></div>Edit this page</a>
1313
</div>
1414
{% endif %}
1515
"""

source/exts/nxt.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -440,20 +440,20 @@ def depart_nxt_tabs(self, node: Element) -> None:
440440

441441
def __write_news_entry(self, e: List[dict], prefix: str = "") -> None:
442442
date = datetime.fromisoformat(e["date"]).strftime("%B %-d, %Y")
443-
self.body.append(
444-
f"""
445-
<div class=nxt_news_item>
446-
<h2>
447-
{e['title']}
448-
<a class=headerlink href={prefix + e['anchor']}
449-
title="Permalink to this headline">§</a>
450-
</h2>
451-
<p class=nxt_news_authordate>
452-
{e['author']}&nbsp;on&nbsp;{date}
453-
</p>
454-
<p>{e['description']}</p>"""
455-
)
456443
if "relurl" in e:
444+
self.body.append(
445+
f"""
446+
<div class=nxt_news_item>
447+
<h2>
448+
<a href={e["relurl"]}>{e['title']}</a>
449+
<a class=headerlink href={prefix + e['anchor']}
450+
title="Permalink to this headline">§</a>
451+
</h2>
452+
<p class=nxt_news_authordate>
453+
{e['author']}&nbsp;on&nbsp;{date}
454+
</p>
455+
<p>{e['description']}</p>"""
456+
)
457457
domain = urlparse(e["relurl"]).netloc
458458
if domain.startswith("www."):
459459
domain = domain[4:]

source/go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta name="go-import" content="unit.nginx.org hg https://hg.nginx.org/unit" />
4+
<meta name="go-import" content="unit.nginx.org git https://github.com/nginx/unit" />
55
<meta http-equiv="refresh" content="0; url=/configuration/#modifying-go-sources" />
66
</head>
77
<body>

source/howto/docker.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ Dockerfile layer:
424424

425425
.. subs-code-block:: docker
426426

427-
FROM nginx/unit:|version|-minimal
427+
FROM unit:|version|-minimal
428428

429429
CMD ["unitd-debug","--no-daemon","--control","unix:/var/run/control.unit.sock"]
430430

@@ -434,7 +434,7 @@ executable with its debug version. Use Unit's :ref:`command-line options
434434

435435
.. subs-code-block:: docker
436436

437-
FROM nginx/unit:|version|-minimal
437+
FROM unit:|version|-minimal
438438

439439
CMD ["unitd","--no-daemon","--control","0.0.0.0:8080"]
440440

source/howto/modules.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ adjust the command samples as needed to fit your scenario.
115115
For details of building Unit language modules, see the source code
116116
:ref:`howto <source-modules>`; it also describes building
117117
:doc:`Unit <source>` itself. For more packaging examples, see our package
118-
`sources <https://hg.nginx.org/unit/file/tip/pkg/>`_.
118+
`sources <https://github.com/nginx/unit/tree/master/pkg>`_.
119119

120120
..
121121
Legacy anchors to preserve existing external links.

source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1724,7 +1724,7 @@ make sure to update the module as well:
17241724

17251725
.. code-block:: console
17261726
1727-
$ hg clone https://hg.nginx.org/unit
1727+
$ git clone https://github.com/nginx/unit
17281728
$ cd unit
17291729
$ pwd
17301730
:nxt_hint:`/home/user/unit <Note the path to the source code>`

source/news/2018/unit-1.4-released.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ routing, and serving of static media assets.
5959

6060
Please also welcome Artem Konev, who joined our team as a technical writer. He
6161
has already started improving documentation on the website and updated it with
62-
the configuration options currently available: https://hg.nginx.org/unit-docs/
62+
the configuration options currently available:
63+
https://github.com/nginx/unit-docs/
6364

6465
Of course, the website still leaves much to be desired, so Artem will strive to
6566
provide industry-grade documentation for Unit. You are welcome to join this

source/news/2023/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ News archive for the year 2023.
5353

5454
.. nxt_news_entry::
5555
:author: Unit Team
56-
:description: Version 1.30.0 adds URI rewrites, expands NJS integration and
56+
:description: Version 1.30.0 adds URI rewrites, expands njs integration and
5757
logging capabilities, and introduces an OpenAPI specification.
5858
:email: unit-owner@nginx.org
5959
:title: Unit 1.30.0 Released
@@ -63,7 +63,7 @@ News archive for the year 2023.
6363
.. nxt_news_entry::
6464
:author: Unit Team
6565
:description: Version 1.29.1 addresses assorted bugs in PHP and Python app
66-
handling, NJS integration, and WebSockets.
66+
handling, njs integration, and WebSockets.
6767
:email: unit-owner@nginx.org
6868
:title: Unit 1.29.1 Released
6969
:date: 2023-02-28

source/news/2024/index.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,25 @@ News of 2024
44

55
News archive for the year 2024.
66

7+
.. nxt_news_entry::
8+
:author: Unit Team
9+
:description: Version 1.32.1 is a maintenance release that fixes bugs in the new WebAssembly Language Module and in our njs implementation.
10+
:email: unit-owner@nginx.org
11+
:title: Unit 1.32.1 Released
12+
:url: news/2024/unit-1.32.1-released
13+
:date: 2024-03-26
14+
715
.. nxt_news_entry::
816
:author: Timo Stark
9-
:description: Building Wasm Components using Feryon's Spin SDK for Rust
17+
:description: Building Wasm Components using Fermyon's Spin SDK for Rust
1018
and run them on NGINX Unit.
1119
:email: unit-owner@nginx.org
1220
:title: Wasm Components: Working with the Spin SDK for Rust
1321
:url: news/2024/fermyon-spin-rust-sdk
1422
:date: 2024-03-13
15-
23+
1624
.. nxt_news_entry::
17-
:author: Timo Stark
25+
:author: Timo Stark
1826
:description: Part 2 of our Wasm Component Model blog series. In this Blog post you will learn
1927
how to build a Rust based Wasm Component and run it on NGINX Unit.
2028
:email: unit-owner@nginx.org

source/news/2024/unit-1.32.0-released.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ the old **unit-wasm** module deprecated now.
1515

1616
Additionally, we have added the following features:
1717

18-
- Enhanced the :doc:`NJS (NGINX JavaScript) experience <../../scripting>` by making all Unit variables
18+
- Enhanced the :doc:`njs (NGINX JavaScript) experience <../../scripting>` by making all Unit variables
1919
accessible from JavaScript
2020

2121
- Added support for
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
:orphan:
2+
3+
####################
4+
Unit 1.32.1 Released
5+
####################
6+
7+
NGINX Unit 1.32.1 is a maintenance release that fixes bugs in the new WebAssembly Language Module and in our njs implementation.
8+
9+
===============
10+
Resolved issues
11+
===============
12+
13+
This release fixes the following issues:
14+
15+
**************************************************************
16+
Applications of type `wasm-wasi-component` can't be restarted
17+
**************************************************************
18+
19+
Applications deployed as `wasm-wasi-components` can't be restarted using the `restart` endpoint.
20+
21+
After deploying a new Wasm Component binary to disk, the restart will trigger a reload of the component in Unit without restarting the server.
22+
23+
As restarts will work independently of the application type, the behavior shipped with **1.32.0** was not right. It has been fixed in this release.
24+
25+
26+
************************************************************
27+
Unit-variables in NGINX JavaScript are constantly cached
28+
************************************************************
29+
30+
In **1.32.0** we added the possibility to access all Unit variables form inside njs.
31+
32+
As reported in GitHub issue `#1169 <https://github.com/nginx/unit/issues/1169>`__ the variables were cached and would hold the wrong value, which is not how this feature should work. With version 1.32.1, we have fixed this issue.
33+
34+
35+
==============
36+
Full Changelog
37+
==============
38+
39+
.. code-block:: none
40+
41+
Changes with Unit 1.32.1 26 Mar 2024
42+
43+
*) Bugfix: NJS variables in templates may have incorrect values due to
44+
improper caching.
45+
46+
*) Bugfix: Wasm application process hangs after receiving restart signal
47+
from the control.
48+
49+
50+
51+
For a full list of changes and bugfixes,
52+
please see the `changelog <../../../CHANGES.txt>`__.

0 commit comments

Comments
 (0)