summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2020-10-01Tests: minor fixes.Andrei Zeliankou10-76/+89
Fixed temporary dir removing. Fixed printing path to log. Module checks moved to the separate file.
2020-09-30Tests: fixed test_static_space_in_name.Andrei Zeliankou1-1/+1
2020-09-30Fixing router connection pool leakage.Max Romanov1-1/+4
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-30Fixing leakage caused by incorrect in_hash flag cleanup.Max Romanov1-1/+3
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-29MIME: added AVIF and APNG image formats.Valentin Bartenev1-1/+4
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-29Wrapping libunit's malloc() and free() calls for logging purposes.Max Romanov3-65/+98
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-29Fixing request buffer memory leakage in router.Max Romanov1-0/+3
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-29Supporting HTTP/1.0 keep-alive.Max Romanov1-1/+8
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-27Tests: tuned delay in test_settings_idle_timeout_2.Andrei Zeliankou1-1/+1
2020-09-27Tests: added pytest.ini.Andrei Zeliankou1-0/+3
2020-09-24Tests: prerequisites check improved by using callable.Max Romanov1-15/+23
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-22Tests: introduced module name configuration.Max Romanov1-3/+10
Also fixed problem with "/" in application name.
2020-09-22Tests: improved response receiving while upgrade.Max Romanov1-4/+1
The patch required to process non-101 response.
2020-09-22Tests: using dict.get() method with default value.Max Romanov1-18/+9
No functional changes. Only code readability improved.
2020-09-21Tests: added variable test with nonexistent upstream.Andrei Zeliankou1-0/+23
2020-09-21Tests: added test for "idle_timeout" with empty payload.Andrei Zeliankou1-0/+18
2020-09-21Tests: added multiple headers concatenation test.Max Romanov1-9/+13
2020-09-21Tests: changing Python application callable name.Max Romanov2-0/+35
2020-09-18Added .hgignore file.Andrei Zeliankou1-0/+6
2020-09-18Updated racially charged language in messages and comments.Artem Konev2-4/+4
2020-09-18Python: app module callable name configuration.Max Romanov4-5/+21
Now it is possible to specify the name of the application callable using optional parameter 'callable'. Default value is 'application'. This closes #290 issue on GitHub.
2020-09-18Fixed segmentation fault during reconfiguration.Igor Sysoev1-7/+3
If idle connection was closed before h1proto had been allocated then c->socket.data is NULL. This happens if nxt_h1p_idle_response() is called by nxt_h1p_idle_close(). However, h1p->conn_write_tail is used only in nxt_h1p_request_send() that would not be called after nxt_h1p_idle_response(). The bug was introduced in f237e8c553fd.
2020-09-18Fixed segmentation fault during reconfiguration.Igor Sysoev1-1/+9
2020-09-18Fixed use-after-free error during reconfiguration.Igor Sysoev1-0/+2
An idle connection was not removed from idle connection list if the connections detected that listening socket had been closed.
2020-08-28Router: fixed "pass" to upstreams.hongzhidao4-3/+90
Messed up return values in nxt_upstream_find() caused error in applying any configuration with a valid "pass" value in router configuration pointing to upstream. That wasn't the case in "listeners" objects, where the return value wasn't checked. Also, it caused segfault in cases where the "pass" option was configured with variables and resulting value was pointing to a non-existent upstream. Added missing return checks as well to catch possible memory allocation errors. The bug was introduced in d32bc428f46b. This closes #472 issue on GitHub.
2020-09-16Tests: migrated to the pytest.Andrei Zeliankou55-6325/+4780
2020-09-16Isolation: remove redundant macro.Tiago Natel de Moura2-4/+1
2020-09-15Python: changed request headers format in router protocol.Max Romanov2-11/+107
The coming ASGI support requires raw HTTP headers format. Headers grouping and upcase code were moved to WSGI module.
2020-09-15Hardening header names comparation for grouping.Max Romanov1-10/+67
2020-09-14Python: split module initialization from WSGI implementation.Max Romanov4-285/+388
This is required for futher ASGI implementation.
2020-09-14Python: source file moved to 'python' sub-directory.Max Romanov2-1/+2
No functional changes. Get ready for an increase in file number.
2020-09-10Fixing WebSocket frame retain function.Max Romanov1-2/+13
Some of the pointers were not adjusted after frame's memory re-allocation. Fortunately, this function was not used and the bug has no effect.
2020-09-07Upstream connection was not closed for short chunked response.Igor Sysoev1-27/+3
2020-08-31Tests: $host varaible test.Andrei Zeliankou1-7/+24
Also added few tests for $uri and minor style fixes.
2020-08-28Vars: added $host.Valentin Bartenev1-0/+20
This closes #407 issue on GitHub.
2020-08-25Tests: disable of language_deps.Tiago Natel de Moura1-0/+69
2020-08-25Isolation: added "automount" option.Tiago Natel de Moura9-34/+112
Now it's possible to disable default bind mounts of languages by setting: { "isolation": { "automount": { "language_deps": false } } } In this case, the user is responsible to provide a "rootfs" containing the language libraries and required files for the application.
2020-08-25Tests: PHP extension mounts.Tiago Natel de Moura3-0/+66
2020-08-25PHP: added bind mounts for extensions directory.Tiago Natel de Moura2-3/+36
2020-08-21Configuration: removed "reschedule_timeout" option.Valentin Bartenev3-18/+0
It's not used since cbcd76704c90. This option is a leftover from previous IPC between router and applications processes. It was never documented, though. Thanks to 洪志道 (Hong Zhi Dao).
2020-08-20Tests: default tmpfs in rootfs.Tiago Natel de Moura1-0/+20
2020-08-20Isolation: mount tmpfs by default.Tiago Natel de Moura5-66/+155
2020-08-20Moved isolation related code to "nxt_isolation.c".Tiago Natel de Moura7-980/+990
2020-08-19Configuration: improved error message of invalid listener address.Valentin Bartenev1-2/+9
Thanks to 洪志道 (Hong Zhi Dao). This closes #466 issue on GitHub.
2020-08-17Supporting platforms without sendfile() implementation.Max Romanov2-5/+20
This is a quick and dirty sendfile() replacement. This closes #452 PR on GitHub.
2020-08-17Style: changing preprocessor directives.Max Romanov1-5/+11
Using #if directives instead of #ifdef the same way as in other places.
2020-08-17Version bump.Valentin Bartenev1-2/+2
2020-08-13Added tag 1.19.0 for changeset 86cdf66f8274Valentin Bartenev1-0/+1
2020-08-13Generated Dockerfiles for Unit 1.19.0.1.19.0Valentin Bartenev8-8/+8
2020-08-13Added version 1.19.0 CHANGES.Valentin Bartenev2-0/+156