Commit Graph

489 Commits

Author SHA1 Message Date
Valentin Bartenev
8fd32c9394 Removed unused "nxt_app_header_field_t" structure.
It's not used since 3b77edf46701.
2018-07-11 16:53:11 +03:00
Alexander Borisov
a27e76779f Ruby: added "require('bundler/setup')".
This closes #93 PR on GitHub.
2018-07-10 15:43:59 +03:00
Valentin Bartenev
1abdcfb2d8 Controller: added "settings" configuration object.
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
      }
  }
2018-07-09 20:34:51 +03:00
Valentin Bartenev
5a05f569b7 Router: increased HTTP connection related limits. 2018-07-09 20:34:51 +03:00
Valentin Bartenev
7e3de003c7 PHP: fixed request body processing.
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.
2018-07-05 16:43:45 +03:00
Valentin Bartenev
234deb51f4 PHP: fixed setting of individual configuration options.
The previous method changed PHP options only for the first request.
On the request completion the options were rolled back.

This closes #145 issue on GitHub.
2018-07-03 17:12:47 +03:00
Valentin Bartenev
11cecce114 HTTP parser: relaxed checking of fields values.
Allowing characters up to 0xFF doesn't conflict with RFC 7230.
Particularly, this make it possible to pass unencoded UTF-8 data
through HTTP headers, which can be useful.
2018-07-03 15:18:16 +03:00
Valentin Bartenev
0366bfad6d Fixed error message about "spare" value. 2018-07-02 18:19:00 +03:00
Valentin Bartenev
145d895430 Controller: fixed handling of zero Content-Length. 2018-07-02 16:36:59 +03:00
Igor Sysoev
313da403a5 Removed -mmacosx-version-min option. 2018-06-28 18:31:27 +03:00
Igor Sysoev
50228b35b6 Removed usage of nxt_thread_context in loadable modules.
This change allows to use __thread class storage on MacOSX.
2018-06-28 18:31:13 +03:00
Igor Sysoev
606eda045b Removed '\r' and '\n' artifact macros. 2018-06-25 16:56:45 +03:00
Valentin Bartenev
1a52d876f7 Introduced nxt_length() macro. 2018-06-25 16:51:47 +03:00
Valentin Bartenev
af31012815 More effective implementation of nxt_popcount().
This method requires as many iterations as there are set bits,
while the previous one has to shift up to the position of the
highest bit.
2018-06-21 16:40:02 +03:00
Sergey Kandaurov
14bc401394 Using own popcount where the compiler builtin is not available. 2018-06-20 19:34:06 +03:00
Max Romanov
b1d7844449 Fixed allocation of multiple shared memory chunks.
Previously, one shared memory chunk was allocated under mutex and other
chunks (if required) were allocated using atomic operations.  So such
allocation is not guaranteed and the result buffer can be less than
requested.

This commit moves multiple chunks allocation under mutex and guarantees
the result buffer is large enough.
2018-06-20 19:11:27 +03:00
Igor Sysoev
3ad1acca12 Fixed exit status on start failure.
This and previous commit close #131 issue on GitHub.
2018-06-18 17:14:32 +03:00
Igor Sysoev
cb36b07686 Removing Unix control socket on start failure.
The bug had appeared in 5cc5002a788e when process type has been
converted to bitmask. This commit reverts the type back to a number.

This commit is related to #131 issue on GitHub.
2018-06-18 17:14:30 +03:00
Igor Sysoev
6273819080 Removed unused single process type. 2018-06-18 17:14:25 +03:00
Valentin Bartenev
e96374bfa1 Version bump. 2018-06-13 15:42:42 +03:00
Valentin Bartenev
8f278a5fed PHP: added setting of individual configuration options. 2018-06-07 16:17:32 +03:00
Valentin Bartenev
388390888b PHP: added setting of php.ini configuration file path. 2018-06-07 16:17:31 +03:00
Valentin Bartenev
771dc2f55e Exported functions for accessing configuration values. 2018-06-07 16:17:30 +03:00
Valentin Bartenev
ceeb301881 Go: specifying command line arguments to the executable.
This closes #110 issue on GitHub.
2018-06-06 16:53:35 +03:00
Igor Sysoev
ff6ca2a82c Fixed keep-alive hanging after reconfiguration. 2018-05-30 18:46:05 +03:00
Igor Sysoev
d3356f7ad2 Added version number to main process title. 2018-05-29 19:51:27 +03:00
Valentin Bartenev
d7e6e2bd8c Configuration of environment variables for application processes. 2018-05-28 20:55:23 +03:00
Sergey Kandaurov
3befb08204 Fixed a dead store.
Found by Clang Static Analyzer.
2018-05-25 16:18:34 +03:00
Sergey Kandaurov
a9ea218e7e Using getrandom() libc interface, SYS_getrandom fixes.
The interface is available since Glibc 2.25, and FreeBSD 12.0.
2018-05-24 20:35:47 +03:00
Valentin Bartenev
3e8dbfe5ff Added SERVER_SOFTWARE request meta-variable. 2018-05-21 16:14:24 +03:00
Max Romanov
07204789bc Eliminating possible NULL pointer dereference.
Found by Coverity (CID 276138).
2018-04-27 20:32:50 +03:00
Valentin Bartenev
10898568a3 Version bump. 2018-04-27 16:48:14 +03:00
Max Romanov
179819dbee Controller waits READY message from router.
This required to avoid racing condition when controller receive router
port before router receives controller port.
2018-04-26 16:44:20 +03:00
Valentin Bartenev
17160e9352 Python: added a missing slash in the path to "pyenv.cfg".
This closes #115 issue on GitHub.
2018-04-25 15:11:01 +03:00
Valentin Bartenev
749f7c0340 Support for PEP 405 virtual environments.
This closes #96 issue on GitHub.
2018-04-24 20:49:36 +03:00
Valentin Bartenev
5371891492 Fixed segfault when two modules have the same type and version.
The bug appeared in 217e48a3b091.
This closes #104 issue on GitHub.
2018-04-20 23:57:46 +03:00
Igor Sysoev
8ed36563d1 Fixed alerts about freeing non-freeable memory on connection close.
The nxt_conn_t object is allocated by nxt_zget() and should not be freed.
2018-04-20 19:46:36 +03:00
Igor Sysoev
b95d5b8882 Prevention of freeing non-freeable memory pool block. 2018-04-20 19:46:36 +03:00
Max Romanov
ad36c8ca8d Go: fixed request.Read() behaviour for EOF.
This closes #108 issue on GitHub.
2018-04-20 17:23:43 +03:00
Valentin Bartenev
a20830ff55 Router: fixed race condition while access log reopening.
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.
2018-04-19 19:48:58 +03:00
Alexander Borisov
da22c2ca96 Python: returning write() callable object from start_response().
According to PEP (3)333 the start_respose() function must return
a write() callable.

This closes #107 issue on GitHub.
2018-04-19 17:35:07 +03:00
Valentin Bartenev
b06a0c95d0 Removed duplicating socket address parsing function.
This also fixes #101 issue on GitHub.  The function previously used to
parse IPv6 address of control socket was broken.  Now the working function
is used instead.
2018-04-18 17:28:22 +03:00
Valentin Bartenev
54ccb32333 Added missing cleanup when nxt_port_socket_write() failed. 2018-04-18 17:28:04 +03:00
Valentin Bartenev
ab4f867996 Added missing checks if nxt_port_rpc_register_handler() failed.
This closes #97 issue on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).
2018-04-17 21:13:43 +03:00
Valentin Bartenev
555141f798 Improved "unitd" command line help. 2018-04-13 20:07:02 +03:00
Valentin Bartenev
115949c50f Version bump. 2018-04-13 19:10:15 +03:00
Valentin Bartenev
946cfa32a8 Version bump. 2018-04-12 19:39:25 +03:00
Igor Sysoev
d5a96ff000 Miscellaneous changes. 2018-04-12 17:11:35 +03:00
Igor Sysoev
8afa51415e Disabling timer when request header has been entirely read. 2018-04-12 17:11:34 +03:00
Igor Sysoev
8e9a950374 Fixed idle timeout, broken in b3e55c647741. 2018-04-12 17:11:33 +03:00