Commit Graph

1633 Commits

Author SHA1 Message Date
Max Romanov
d8628a43d0 Fixing uninitialized ncpu value on unsupported platforms.
Thanks to @geyslan.

This closes #455 issue on GitHub.
2020-10-14 18:41:31 +03:00
Max Romanov
9dcb7ec4b7 Java: response locale methods implemented.
This closes #479 issue on GitHub.
2020-10-14 16:18:34 +03:00
Igor Sysoev
90b2c9f7d6 Using union instead of "void *". 2020-10-13 12:56:56 +03:00
Igor Sysoev
f541cbcce4 Using C99 style declaration. 2020-10-13 12:56:56 +03:00
Igor Sysoev
edafa954d4 Reordering declarations. 2020-10-13 12:56:56 +03:00
Valentin Bartenev
0919166145 Fixed building with Python 3.9.
PyUnicode_GET_SIZE() in deprecated since 3.3 and will be removed in 3.12.
In version 3.9 it was explicitly marked by deprecation warning causing
compilation error with Unit.

PyUnicode_GET_LENGTH() must be used instead.
2020-10-13 01:37:39 +03:00
Valentin Bartenev
c4f2a58aaf Version bump. 2020-10-13 01:37:39 +03:00
Valentin Bartenev
ad516735a6 Adjusted tag 1.20.0 to include 0e985b300673. 2020-10-08 19:09:16 +03:00
Valentin Bartenev
7d77d50568 Updated 1.20.0 CHANGES to include pytest migration. 2020-10-08 19:04:40 +03:00
Valentin Bartenev
10468ed22b Added tag 1.20.0 for changeset f7e9cf490512 2020-10-08 18:55:50 +03:00
Valentin Bartenev
03d965b49c Generated Dockerfiles for Unit 1.20.0. 2020-10-08 18:32:48 +03:00
Valentin Bartenev
f221ddbe66 Added version 1.20.0 CHANGES. 2020-10-08 18:32:36 +03:00
Konstantin Pavlov
bebc3746ca Regenerated dockerfiles. 2020-09-22 15:55:28 +03:00
Konstantin Pavlov
5a8adce8c2 Ensure docker images are using latest versions of base OS packages. 2020-09-22 15:55:28 +03:00
Konstantin Pavlov
e0f66cbba0 Added jsc11 docker image. 2020-09-22 15:55:28 +03:00
Valentin Bartenev
2821b3347c PHP: compatibility with 8.0.0 RC1.
This closes #474 PR on GitHub.
2020-10-06 18:12:05 +03:00
Andrei Zeliankou
6ec0ff3596 Tests: minor fixes. 2020-10-07 23:18:43 +01:00
Valentin Bartenev
645683f432 Tests: fixed loading selected module version.
Previously, for PHP, Ruby, and Perl the latest version was always loaded
in multi-version tests.
2020-10-07 22:04:54 +03:00
Valentin Bartenev
3f513f434f Router: fixed "not empty" pattern matching.
The "!" pattern should be opposite to "", i.e. match only non-empty values.
But after 3c00af54b937 it was equal to "!*", which is wrong.
2020-10-07 20:06:30 +03:00
Andrei Zeliankou
37390d2a3b Tests: fixed tests to run as root. 2020-10-06 20:30:51 +01:00
Max Romanov
703d79042b Removing a meaningless warning message.
Data in the queue and the socket are transmitted independently; special
READ_QUEUE and READ_SOCKET message types are used for synchronization.

The warning was accidentally committed with changeset 1d84b9e4b459.
2020-10-06 19:06:33 +03:00
Max Romanov
481e950b86 Tests: pretty versions output for multi-version tests. 2020-10-05 13:26:35 +03:00
Andrei Zeliankou
58cc73994f Tests: added websocket test with long length. 2020-10-05 11:05:19 +01:00
Andrei Zeliankou
152ad526f4 Tests: added ASGI Lifespan. 2020-10-05 11:05:00 +01:00
Igor Sysoev
9d8d2c1758 Fixed comment.
Thanks to 洪志道 (Hong Zhi Dao).
2020-10-02 15:16:09 +03:00
Max Romanov
12f225a43a Tests: added ASGI HTTP applications. 2020-10-01 23:55:43 +03:00
Max Romanov
d97e3a3296 Tests: added ASGI WebSocket. 2020-10-01 23:55:35 +03:00
Max Romanov
c4c2f90c5b Python: ASGI server introduced.
This closes #461 issue on GitHub.
2020-10-01 23:55:23 +03:00
Max Romanov
bbc6d2470a Publishing libunit's malloc() and free() wrappers for apps. 2020-10-01 23:55:10 +03:00
Tiago Natel de Moura
c2eb245b32 PHP: fixed "rootfs" isolation dependency on system mounts. 2020-09-09 19:28:44 +01:00
Andrei Zeliankou
d491527555 Tests: minor fixes.
Fixed temporary dir removing.
Fixed printing path to log.
Module checks moved to the separate file.
2020-10-01 10:17:00 +01:00
Andrei Zeliankou
1fe1518ab1 Tests: fixed test_static_space_in_name. 2020-09-30 22:45:58 +01:00
Max Romanov
c5cb2432c4 Fixing router connection pool leakage.
The connection's local socket address is allocated from the connection
pool before the request is passed to the application; however, with keep-alive
connections, this field was unconditionally reset by a socket configuration
value that could be NULL.  For the next request, the address was allocated
again from the same connection pool.  Nonetheless, all leaked addresses
were released when the connection was closed.

The issue introduced in changeset 5c7dd85fabd5.
2020-09-30 16:36:57 +03:00
Max Romanov
153e8a8779 Fixing leakage caused by incorrect in_hash flag cleanup.
Large-bodied requests are added to the request hash to be found when the body
arrives.  However, changeset 1d84b9e4b459 introduced a bug: the 'in_hash' flag,
used to remove the request from the hash at request release, was cleared after
the first successful request lookup.  As a result, the entry was never removed.
2020-09-30 01:17:09 +03:00
Valentin Bartenev
67d33fac66 MIME: added AVIF and APNG image formats.
AVIF is a modern image format based on the AV1 video codec.  It generally has
better compression than other widely used formats (WebP, JPEG, PNG, and GIF)
and is designed to supersede them.  Support was already added to the latest
version of Chrome.

APNG extends PNG to permit animated images that work similarly to animated GIF.
It's supported by most modern browsers.

Also removed duplicated ".svg" entry.
2020-09-29 23:23:32 +03:00
Max Romanov
61eba6eef1 Wrapping libunit's malloc() and free() calls for logging purposes.
This change aids heap usage analysis in applications.
The alloc and free functions are also required for lvlhash due to the upcoming
threading support, because using main nxt_memalign() and nxt_free() isn't safe
in a multithreaded app environment.  The reason is that these functions may use
thread-local structures which aren't initialized properly in applications.
2020-09-29 22:58:04 +03:00
Max Romanov
c721a5378d Fixing request buffer memory leakage in router.
The issue was introduced in changeset 1d84b9e4b459.  The request buffer was
transferred via the shared application queue, but the buffer position and the
'sent' flag were not updated after the buffer had been sent.
2020-09-29 22:57:56 +03:00
Max Romanov
c4b000f9cc Supporting HTTP/1.0 keep-alive.
The Apache HTTP server benchmarking tool, ab, issues HTTP/1.0 requests with
the 'Connection: Keep-Alive' header and expects a 'Connection: Keep-Alive'
header in the response.
2020-09-29 22:57:46 +03:00
Andrei Zeliankou
4de6ffa63f Tests: tuned delay in test_settings_idle_timeout_2. 2020-09-27 23:46:31 +01:00
Andrei Zeliankou
4095454946 Tests: added pytest.ini. 2020-09-27 23:27:19 +01:00
Max Romanov
efe65dee4d Tests: prerequisites check improved by using callable.
This is required for more flexible Python version check since ASGI works
for Python 3.5+.  Version check via 'startswith()' function removed as
not consistent.
2020-09-24 09:47:27 +03:00
Max Romanov
1fc51cf140 Tests: introduced module name configuration.
Also fixed problem with "/" in application name.
2020-09-22 19:53:19 +03:00
Max Romanov
dc49c561e2 Tests: improved response receiving while upgrade.
The patch required to process non-101 response.
2020-09-22 12:40:35 +03:00
Max Romanov
767c4cb508 Tests: using dict.get() method with default value.
No functional changes.  Only code readability improved.
2020-09-22 12:40:18 +03:00
Andrei Zeliankou
98c86c415c Tests: added variable test with nonexistent upstream. 2020-09-21 21:29:34 +01:00
Andrei Zeliankou
39008c1f05 Tests: added test for "idle_timeout" with empty payload. 2020-09-21 21:24:42 +01:00
Max Romanov
449652afa1 Tests: added multiple headers concatenation test. 2020-09-21 21:18:13 +03:00
Max Romanov
af964488ba Tests: changing Python application callable name. 2020-09-21 10:32:14 +03:00
Andrei Zeliankou
7842c2d980 Added .hgignore file. 2020-09-18 19:37:56 +01:00
Artem Konev
8ee96c224a Updated racially charged language in messages and comments. 2020-09-18 11:46:15 +01:00