Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
The "nxt_http_websocket" request state, defined in "nxt_http_websocket.c",
is used in "nxt_router.c" and must be linked with external symbol declared
in "nxt_router.c".
Due to the missing "extern" keyword, building Unit with some linkers
(notably gold and LLD) caused WebSocket connections to get stuck or even
crash the router process.
|
|
|
|
|
|
Request state ready_handler required for further websocket events processing.
It is not required for regular response transferring.
|
|
Fields are filtered one by one before being added to fields list.
This avoids adding and then skipping connection-specific fields.
|
|
- nxt_req_app_link_t -> nxt_request_app_link_t
- nxt_req_conn_link_t -> nxt_request_rpc_data_t
Corresponding abbreviated field names also changed:
- ra -> req_app_link
- rc -> req_rpc_data
|
|
Now it's possible to delete "listeners" and "applications" objects.
This closes #187 issue on GitHub.
|
|
|
|
Before this fix, request in router may hang until timeout expired if
application crashed during request processing.
|
|
This closes #223 issue on GitHub.
|
|
|
|
|
|
|
|
This message produces too many noise in log and complicates analysis.
|
|
Previously, the nxt_router_prepare_msg() function expected server host among
other headers unmodified. It's not true anymore since normalization of the
Host header has been introduced in 77aad2c142a0.
The nxt_unit_split_host() function was removed. It didn't work correctly with
IPv6 literals. Anyway, after 77aad2c142a0 the port splitting is done in router
while Host header processing.
|
|
|
|
It doesn't do anything useful, among creating a JSON message and logging it
to debug log. Besides that it causes segmentation fault if the RPC handler
is triggered with an empty buffer due to exiting of the main process.
|
|
This fixes memory leak if configuration uses more than one TLS cerificate.
|
|
|
|
Timers that don't require maximum precision (most of them, actually) can be
triggered earlier or later within the bias interval.
To reduce wakeups by timers, the expire function now triggers not only all
timers that fall within the elapsed time, but also those whose bias falls
within this interval.
|
|
There's nothing specific to Go language. This type of application object can
be used to run any external application that utilizes libunit API.
|
|
Router reconfiguration may lead to starting new application processes, opening
listen ports etc. These actions are asynchronous and require message
exchange with master process. Router stores reference for controller
(response) port in structure associated with reconfiguration process (tmcf).
The port used to provide reconfiguration response (either success or failed)
to controller.
This commit increases response port use counter to make sure port structure
not freed while router waits for result of asynchronous operations.
|
|
|
|
|
|
Attribute 'application' is optional in listener object. This commit adds
missing code to reset 'lscf' to avoid garbage and crash when the attribute
is absent.
|
|
For accurate app descriptor release, it is required to count the number of
use counts. Use count increased when:
- app linked to configuration app queue;
- socket conf stores pointer to app;
- request for start app process posted to router service thread;
Application port has pointer to app, but it does not increase use count
to avoid use count loop.
Timer needs a pointer to nxt_timer_t which is stored in engine timers tree.
nxt_timer_t now resides in nxt_app_joint_t and does not lock the application.
Start process port RPC handlers is also linked to nxt_app_joint_t.
App joint (nxt_app_joint_t) is a 'weak pointer':
- single threaded;
- use countable;
- store pointer to nxt_app_t (which can be NULL);
nxt_app_t has pointer to nxt_app_joint_t and update its pointer to app.
|
|
Library now used in all language modules.
Old 'nxt_app_*' code removed.
See src/test/nxt_unit_app_test.c for usage sample.
|
|
It has the following structure and default values:
{
"http": {
"header_read_timeout": 30,
"body_read_timeout": 30,
"send_timeout": 30,
"idle_timeout": 180,
"max_body_size": 8388608
}
}
|
|
|
|
The implementation of module was based on the assumption that PHP reads request
body and headers in the particular order. For the POST request the body goes
before headers and vice versa for all other requests.
But as it appeared later, this order is unspecified and depends on many factors,
including the particular code of PHP application. Among other factors those
can affect ordering:
- presence of "Content-Type" header;
- "variables_order" php.ini setting;
- "enable_post_data_reading" php.ini setting;
- reading php://input by application;
and this list can be incomplete.
As a temporary workaround, request body now is always put before headers and it
is gracefully skipped whenever PHP wants to get headers.
This closes #144 issue on GitHub.
|
|
|
|
|
|
Found by Coverity (CID 276138).
|
|
This required to avoid racing condition when controller receive router
port before router receives controller port.
|
|
In order to reopen access log, the router process creates a memory pool
and allocates a buffer to send RPC message for the main process.
Previously, the memory pool was destroyed when RPC response handler was
called. It appeared, that the buffer completion handler could be not
triggered by that time and still remained in a queue.
Now the memory pool is destroyed only after both events are happen.
|
|
|
|
This closes #97 issue on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).
|
|
|
|
|
|
Server error response generated or connection closed.
|
|
|
|
|
|
|
|
|
|
|
|
Request can be terminated because of invalid response headers and content
should be ignored in this case.
|
|
|