|
| 1 | +:orphan: |
| 2 | + |
| 3 | +#################### |
| 4 | +Unit 1.35.0 Released |
| 5 | +#################### |
| 6 | + |
| 7 | +We are pleased to announce the release of NGINX Unit 1.35.0. This release |
| 8 | +includes a number of new features and changes: |
| 9 | + |
| 10 | +************************ |
| 11 | +HTTP compression support |
| 12 | +************************ |
| 13 | + |
| 14 | +We are pleased to release the initial implementation of HTTP compression |
| 15 | +support, an oft-asked for feature. |
| 16 | + |
| 17 | +It supports any or all of zlib (deflate, gzip), zstd and brotli. |
| 18 | + |
| 19 | +It will compress both static and application (with some restrictions) |
| 20 | +responses. |
| 21 | + |
| 22 | +If building from source, support can be enabled by specifying any or all |
| 23 | +of |
| 24 | + |
| 25 | +.. code-block:: |
| 26 | +
|
| 27 | + --zlib --zstd --brotli |
| 28 | +
|
| 29 | +to ``./configure`` |
| 30 | + |
| 31 | +zlib can use either the traditional zlib library or the new |
| 32 | +zlib-ng-compat library. |
| 33 | + |
| 34 | +This can then be configured via the standard Unit configuration. |
| 35 | + |
| 36 | +There is a new '/settings/http/compression' object that is used to |
| 37 | +describe the compression configuration. E.g. |
| 38 | + |
| 39 | +.. code-block:: json |
| 40 | +
|
| 41 | + "compression": { |
| 42 | + "types": [ |
| 43 | + "text/*" |
| 44 | + ], |
| 45 | + "compressors": [ |
| 46 | + { |
| 47 | + "encoding": "gzip", |
| 48 | + "level": 3, |
| 49 | + "min_length": 4096 |
| 50 | + }, |
| 51 | + { |
| 52 | + "encoding": "deflate", |
| 53 | + "min_length": 0 |
| 54 | + }, |
| 55 | + { |
| 56 | + "encoding": "zstd", |
| 57 | + }, |
| 58 | + { |
| 59 | + "encoding": "br", |
| 60 | + "min_length": 1024 |
| 61 | + } |
| 62 | + ] |
| 63 | + } |
| 64 | +
|
| 65 | +The first item ``types`` is an array of MIME types that are considered for |
| 66 | +compression. |
| 67 | + |
| 68 | +These are MIME types as recognised by Unit, you may need to add your own |
| 69 | +via the ``/settings/http/static/mime_types`` object. |
| 70 | + |
| 71 | +Then we have ``compressors`` this is an array of objects describing the |
| 72 | +compression methods to enable, if you specify a compression method here |
| 73 | +that hasn't been built into Unit, you will get a configuration error. |
| 74 | + |
| 75 | +Each compression object has a *required* ``encoding`` member that defines |
| 76 | +the compression method to enable. |
| 77 | + |
| 78 | +An optional ``level`` member with defines the compression level to use, |
| 79 | +this value is specific to each compressor, if it's not specified then |
| 80 | +the default for that compression method will be used. |
| 81 | + |
| 82 | +An optional ``min_length`` member that specifies the minimum amount of |
| 83 | +data to be considered for compression. If set to 0 or not specified then |
| 84 | +there is no minimum amount before compression may happen. |
| 85 | + |
| 86 | +Compression will happen for both static and application responses. |
| 87 | + |
| 88 | +For application responses, compressed responses will be sent chunked. |
| 89 | +Also with application responses we will only consider compressing output |
| 90 | +where we know the content length. |
| 91 | + |
| 92 | +********************** |
| 93 | +Improved compatibility |
| 94 | +********************** |
| 95 | + |
| 96 | +Unit 1.35.0 introduces support for Ruby 3.4 and Django 5.x |
| 97 | + |
| 98 | +Websockets with the Python Litestar framework has been fixed. Also a |
| 99 | +long standing issue related to Firefox and websockets has also been |
| 100 | +fixed. |
| 101 | + |
| 102 | +*** |
| 103 | +njs |
| 104 | +*** |
| 105 | + |
| 106 | +This version of Unit requires njs >= 0.9.0 |
| 107 | + |
| 108 | +******* |
| 109 | +Changes |
| 110 | +******* |
| 111 | + |
| 112 | +We now flow the correct server listen socket port number through to |
| 113 | +applications via SERVER_PORT rather than hard coding it to 80. |
| 114 | + |
| 115 | +Thus the SERVER_PORT variable will now contain the port number that the |
| 116 | +connection was accept(2)ed on. |
| 117 | + |
| 118 | +********** |
| 119 | +Developers |
| 120 | +********** |
| 121 | + |
| 122 | +GCC 15 introduced a new warning, *Wunterminated-string-initialization* to |
| 123 | +catch things like |
| 124 | + |
| 125 | +.. code-block:: c |
| 126 | +
|
| 127 | + static const char str[11] = "Hello World"; |
| 128 | +
|
| 129 | +which will now produce a warning with |
| 130 | +``-Wunterminated-string-initialization`` or ``-Wextra`` |
| 131 | + |
| 132 | +However there are often times when you want non-NUL terminated string |
| 133 | +literals. E.g. |
| 134 | + |
| 135 | +.. code-block:: c |
| 136 | +
|
| 137 | + static const char hex[16] = "0123456789ABCDEF"; |
| 138 | +
|
| 139 | +which is used as a lookup table and will only ever be accessed via |
| 140 | +individual indices 0-15. |
| 141 | + |
| 142 | +To accommodate such things we introduce a new macro |
| 143 | + |
| 144 | +.. code-block:: c |
| 145 | +
|
| 146 | + NXT_NONSTRING |
| 147 | +
|
| 148 | +which is an alias for |
| 149 | + |
| 150 | +.. code-block:: c |
| 151 | +
|
| 152 | + __attribute__((__nonstring__)) |
| 153 | +
|
| 154 | +which will quell the warning, e.g. |
| 155 | + |
| 156 | +.. code-block:: c |
| 157 | +
|
| 158 | + static const char hex[16] NXT_NONSTRING = "0123456789ABCDEF"; |
| 159 | +
|
| 160 | +************** |
| 161 | +Full Changelog |
| 162 | +************** |
| 163 | + |
| 164 | +.. code-block:: none |
| 165 | +
|
| 166 | + Changes with Unit 1.35.0 26 Aug 2025 |
| 167 | +
|
| 168 | + *) Security: fix missing websocket payload length validation in the |
| 169 | + Java language module which could lead to Java language |
| 170 | + module processes consuming excess CPU. (CVE-2025-1695). |
| 171 | +
|
| 172 | + *) Change: if building with njs, version 0.9.0 or later is now |
| 173 | + required. |
| 174 | +
|
| 175 | + *) Feature: HTTP compression. |
| 176 | +
|
| 177 | + *) Feature: Django 5.x compatibility. |
| 178 | +
|
| 179 | + *) Feature: Python Litestar WebSockets compatibility. |
| 180 | +
|
| 181 | + *) Feature: GCC 15 compatibility. |
| 182 | +
|
| 183 | + *) Feature: Ruby 3.4 compatibility. |
| 184 | +
|
| 185 | + *) Bugfix: set SERVER_PORT to the actual value. |
| 186 | +
|
| 187 | + *) Bugfix: fix issue in node.js with duplicate headers in response. |
| 188 | +
|
| 189 | + *) Bugfix: fix WebSockets with Firefox. |
| 190 | +
|
| 191 | + *) Bugfix: fix incorrect websocket payload length calculation in the |
| 192 | + Java language module. |
| 193 | +
|
| 194 | + *) Bugfix: fix instability issues due to OpenTelemetry (OTEL) |
| 195 | + support. |
| 196 | +
|
| 197 | + *) Bugfix: fix issues with building OpenTelemetry (OTEL) support on |
| 198 | + various platforms, including macOS. |
0 commit comments