summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2020-12-07HTTP: fixed status line format for unknown status codes.Valentin Bartenev2-17/+26
According to Section #3.1.2 of RFC 7230, after the status code there must be a space even if the reason phrase is empty. Also, only 3 digits allowed. This closes #507 issue on GitHub.
2020-12-07Node.js: avoided use of request struct for debug logging.Max Romanov1-3/+3
This fixes a crash on exit of Node.js application. The crash reproduced on Ubuntu 20.10 with Node.js v15.1.0. Tests 'test_node_websockets_two_clients' and 'test_node_websockets_7_13_1__7_13_2'. The reason of the crash is using request struct which was already freed. The issue was introduced in 5be509fda29e.
2020-12-06Tests: options moved to the separate class.Andrei Zeliankou39-41/+62
This change is necessary to separate the logic and prevent possible circular dependency.
2020-11-30Node.js: removing unnecessary warnings.Max Romanov1-18/+6
Warnings changed for debug messages.
2020-11-24Libunit: improved error logging around initialization env variable.Valentin Bartenev1-12/+31
2020-11-24Version bump.Valentin Bartenev2-2/+9
2020-11-19Added tag 1.21.0 for changeset f804aaf7eee1Valentin Bartenev1-0/+1
2020-11-19Generated Dockerfiles for Unit 1.21.0.1.21.0Valentin Bartenev9-9/+9
2020-11-19Added version 1.21.0 CHANGES.Valentin Bartenev2-0/+210
2020-11-17Router: matching regular expressions support.Axel Duch13-36/+572
2020-11-19Libunit: fixing read buffer leakage.Max Romanov1-0/+1
If shared queue is empty, allocated read buffer should be explicitly released. Found by Coverity (CID 363943). The issue was introduced in f5ba5973a0a3.
2020-11-19Tests: added tests for a "discard_unsafe_fields" option.Andrei Zeliankou2-0/+47
2020-11-19Tests: style.Andrei Zeliankou1-36/+40
2020-11-18Python: improving ASGI http send message processing.Max Romanov1-12/+13
2020-11-18Libunit: fixing read buffer allocations on exit.Max Romanov1-5/+5
2020-11-18Libunit: closing active requests on quit.Max Romanov5-11/+96
2020-11-18Libunit: making minor tweaks.Max Romanov1-11/+4
Removing unnecessary context operations from shared queue processing loop. Initializing temporary queues only when required.
2020-11-18Go: removing C proxy functions and re-using goroutines.Max Romanov8-303/+225
2020-11-18Libunit: fixing racing condition in request struct recycling.Max Romanov1-2/+2
The issue occurred under highly concurrent request load in Go applications. Such applications are multi-threaded but use a single libunit context; any thread-safe code in the libunit context is only required for Go applications. As a result of improper request state reset, the recycled request structure was recovered in the released state, so further operations with this request resulted in 'response already sent' warnings. However, the actual response was never delivered to the router and the client.
2020-11-18Libunit: fixing racing condition for port add / state change.Max Romanov1-39/+87
The issue only occurred in Go applications because "port_send" is overloaded only in Go. To reproduce it, send multiple concurrent requests to the application after it has initialised. The warning message "[unit] [go] port NNN:dd not found" is the first visible aspect of the issue; the second and more valuable one is a closed connection, an error response, or a hanging response to some requests. When the application starts, it is unaware of the router's worker thread ports, so it requests the ports from the router after receiving requests from the corresponding router worker threads. When multiple requests are processed simultaneously, the router port may be required by several requests, so request processing starts only after the application receives the required port information. The port should be added to the Go port repository after its 'ready' flag is updated. Otherwise, Unit may start processing some requests and use the port before it is in the repository. The issue was introduced in changeset 78836321a126.
2020-11-18Libunit: improving logging consistency.Max Romanov5-6/+11
Debug logging depends on macros defined in nxt_auto_config.h.
2020-11-17HTTP parser: allowed more characters in header field names.Valentin Bartenev7-37/+100
Previously, all requests that contained in header field names characters other than alphanumeric, or "-", or "_" were rejected with a 400 "Bad Request" error response. Now, the parser allows the same set of characters as specified in RFC 7230, including: "!", "#", "$", "%", "&", "'", "*", "+", ".", "^", "`", "|", and "~". Header field names that contain only these characters are considered valid. Also, there's a new option introduced: "discard_unsafe_fields". It accepts boolean value and it is set to "true" by default. When this option is "true", all header field names that contain characters in valid range, but other than alphanumeric or "-" are skipped during parsing. When the option is "false", these header fields aren't skipped. Requests with non-valid characters in header field names according to RFC 7230 are rejected regardless of "discard_unsafe_fields" setting. This closes #422 issue on GitHub.
2020-11-16Isolation: added option to disable "procfs" mount.Tiago Natel de Moura3-18/+31
Now users can disable the default procfs mount point in the rootfs. { "isolation": { "automount": { "procfs": false } } }
2020-11-16Tests: tmpfs automount.Tiago Natel de Moura2-3/+29
2020-11-16Tests: fixing tests interrupt in terminal.Max Romanov10-9/+52
KeyboardInterrupt re-raised.
2020-11-16Tests: making available versions unique.Max Romanov1-4/+3
2020-11-13Isolation: added option to disable tmpfs mount.Tiago Natel de Moura3-19/+33
Now users can disable the default tmpfs mount point in the rootfs. { "isolation": { "automount": { "tmpfs": false } } }
2020-11-12Tests: removed test case that reuses rootfs path.Tiago Natel de Moura1-4/+0
Different applications cannot reuse the same rootfs path if not using namespaces because of globally visible builtin mount points.
2020-11-12Tests: added a test for "body_buffer_size" option.Andrei Zeliankou1-0/+38
2020-11-11Tests: added a test for fastcgi_finish_request() function.Andrei Zeliankou2-0/+37
2020-11-11PHP: implementation of the fastcgi_finish_request() function.Valentin Bartenev1-2/+76
This closes #219 issue on GitHub.
2020-11-11PHP: prevention of consuming unread request body on finalization.Valentin Bartenev1-0/+15
The php_request_shutdown() function calls sapi_deactivate() that tries to read request body into a dummy buffer. In our case it's just waste of CPU cycles. This change is also required for the following implementation of the fastcgi_finish_request() function, where the request context can be cleared by the time of finalization.
2020-11-10Fixing multi-buffer body send to application.Max Romanov2-6/+20
Application shared queue only capable to pass one shared memory buffer. The rest buffers in chain needs to be send directly to application in response to REQ_HEADERS_AC message. The issue can be reproduced for configurations where 'body_buffer_size' is greater than memory segment size (10 Mb). Requests with body size greater than 10 Mb are just `stuck` e.g. not passed to application awaiting for more data from router. The bug was introduced in 1d84b9e4b459 (v1.19.0).
2020-11-10Python: supporting ASGI legacy protocol.Max Romanov11-28/+242
Introducing manual protocol selection for 'universal' apps and frameworks.
2020-11-10Java: fixing isolation mounts for Alpine musl.Max Romanov1-1/+1
Thanks to @wujjpp. This closes #490 PR on GitHub.
2020-11-10Tests: supporting instant app parameters in load().Max Romanov3-89/+37
2020-11-09Packages: added Ubuntu 20.10 "groovy" support.Andrei Belov8-1/+274
2020-11-06Java: fixing ClassGraph deprecated API call.Max Romanov1-1/+1
The issue (deprecated API warning) introduced by ClassGraph upgrade in ccd5c695b739 commit.
2020-11-06Tests: fixing racing condition in ASGI threads test.Max Romanov1-5/+5
ASGI threads read all the requests from the queue before start processing it. This why test need to wait a little to let the ASGI thread start request processing and block. In virtual environment any thread or process may be delayed and only method to avoid racing is a reasonable sleep increase.
2020-11-05Ruby: error checking during thread creation.Max Romanov1-2/+6
Application terminates in case of thread creation failure.
2020-11-05Tests: added Perl threading tests.Max Romanov2-0/+52
2020-11-05Perl: request processing in multiple threads.Max Romanov5-148/+374
This closes #486 issue on GitHub.
2020-11-05Tests: added Ruby threading tests.Max Romanov2-0/+54
2020-11-05Ruby: request processing in multiple threads.Max Romanov6-206/+510
This closes #482 issue on GitHub.
2020-11-05Ruby: reusing static constant references to string objects.Max Romanov1-43/+115
This shall save a couple of CPU cycles in request processing.
2020-11-05Tests: added Java threading tests.Max Romanov2-0/+73
2020-11-05Java: request processing in multiple threads.Max Romanov4-14/+205
This closes #458 issue on GitHub.
2020-11-05Tests: added Python threading tests.Max Romanov4-0/+124
2020-11-05Python: fixing some arguments reference counting.Max Romanov1-33/+130
2020-11-05Python: request processing in multiple threads.Max Romanov13-497/+992
This closes #459 issue on GitHub.