Commit Graph
100 Commits
Author SHA1 Message Date
Valentin Bartenev 41317e37da HTTP parser: saving partial method.
This is useful for log purposes.
2018-04-10 16:51:22 +03:00
Valentin Bartenev 8d697e8004 HTTP parser: saving unsupported version.
This is useful for log purposes.
2018-04-10 16:51:22 +03:00
Valentin Bartenev b1b9c78362 HTTP parser: correct "target" for partial or invalid request line. 2018-04-10 16:51:22 +03:00
Valentin Bartenev eb51264710 Processing of partially parsed HTTP header.
This is useful for log purposes.
2018-04-09 19:16:19 +03:00
Valentin Bartenev 96927e7d0c Controller: fixed a memory leak when PUT operation failed.
Thanks to 洪志道 (Hong Zhi Dao).
2018-04-08 14:08:06 +03:00
Valentin Bartenev c0a423aa74 Fixed NXT_INT64_T_HEXLEN.
This closes #89 issue on GitHub.
Thanks to hongzhidao.
2018-04-05 15:54:08 +03:00
Valentin Bartenev d15b4ca906 Style. 2018-04-05 15:49:41 +03:00
Valentin Bartenev 0665896a55 Style: capitalized letters in hexadecimal literals. 2018-04-04 18:13:05 +03:00
Valentin Bartenev f4cb476feb Version bump. 2018-04-02 17:42:36 +03:00
Valentin Bartenev 9844ecd9ec Added tag 0.7 for changeset d2fcec5b0fa3 2018-03-22 21:09:37 +03:00
Valentin Bartenev 157120bfd1 Generated Dockerfiles for Unit 0.7. 2018-03-22 21:07:06 +03:00
Valentin Bartenev 228d8518c7 Added version 0.7 CHANGES. 2018-03-22 21:07:06 +03:00
Valentin Bartenev e254eecb77 PHP: fixed segfault on initialization.
PHP SAPI can call log handler while initializing.  Particularly, that happens
if there's a problem in loading some extension specified in php.ini file.
On this stage server context is empty, so now nxt_thread_log_error() is used.
2018-03-16 18:19:48 +03:00
Valentin Bartenev 701a54c177 HTTP parser: excluding leading and trailing tabs from field values.
As required by RFC 7230.
2018-03-15 21:08:29 +03:00
Valentin Bartenev 0b628bfe48 HTTP parser: allowing tabs in field values as per RFC 7230. 2018-03-15 21:07:57 +03:00
Valentin Bartenev 3d2f85d9ca HTTP parser: restricting allowed characters in fields values.
According to RFC 7230 only printable 7-bit ASCII characters are allowed
in field values.
2018-03-15 21:07:56 +03:00
Valentin Bartenev 5a003df1fe HTTP parser: fixed parsing of field values ending with space.
This closes #82 issue on GitHub.
2018-03-15 20:52:39 +03:00
Valentin Bartenev f81fa2a921 Python: safety checks for request processing context.
An application can store request related functions and mistakenly call them
outside of request processing.  Previously this resulted in segmentation
fault due to unset nxt_python_run_ctx.  Now an exception will be raised.
2018-03-15 17:11:13 +03:00
Valentin Bartenev cf2767625f Python: fixed crash if start_response() is called inside iteration.
The start_response() uses nxt_python_run_ctx, but it was unset right
after the application call.
2018-03-15 17:10:24 +03:00
Valentin Bartenev bebc5845f8 Capitalization in the "Server" field. 2018-03-13 20:32:47 +03:00
Valentin Bartenev 912a49c609 Reduced number of critical log levels. 2018-03-05 17:32:50 +03:00
Valentin Bartenev 27b00629e1 Fixed race condition while discovering modules.
Previously, the discovery process might exit before the main process
received a list of available modules.
2018-02-14 16:33:35 +03:00
Valentin Bartenev 9646772a00 HTTP: the Date response header. 2018-02-12 16:58:40 +03:00
Valentin Bartenev dc50773e51 Version bump. 2018-02-12 16:58:38 +03:00
Valentin Bartenev 582fd34f35 Added tag 0.6 for changeset 88831b81e384 2018-02-09 19:24:46 +03:00
Valentin Bartenev 87f0dce1f6 Generated Dockerfiles for Unit 0.6. 2018-02-09 19:07:55 +03:00
Valentin Bartenev 061343520d Added version 0.6 CHANGES. 2018-02-09 19:07:55 +03:00
Valentin Bartenev 24d07cfdd2 Made nxt_assert() statements to be compiled only with debug. 2018-02-09 19:07:55 +03:00
Valentin Bartenev fc496c19ac Changed the default number of spare processes to 0. 2018-02-09 19:06:53 +03:00
Valentin Bartenev 9d683d37b1 Fixed starting of applications with specified version.
The "type" option can contain version number that need to be cut off before
calling nxt_app_parse_type().

The bug was introduced in 4979fe09d9cd.
2018-02-09 19:06:53 +03:00
Valentin Bartenev c890f53d10 Version bump. 2018-02-09 19:06:53 +03:00
Valentin Bartenev 7daf2cbfef Added tag 0.5 for changeset 1ba4d13d222b 2018-02-08 19:11:53 +03:00
Valentin Bartenev 01c6f149a6 Generated Dockerfiles for Unit 0.5. 2018-02-08 18:59:02 +03:00
Valentin Bartenev 40a360b640 Added version 0.5 CHANGES. 2018-02-08 18:42:51 +03:00
Valentin Bartenev 31f72401d9 Fixed reading of the rest of body, again.
The last attempt in ee5f278e8c81 wasn't enough.
2018-02-07 18:17:41 +03:00
Valentin Bartenev 7fe8f72364 HTTP parser: simplified nxt_http_parse_field_value().
There's no need in loop after 4ac474b68658.

Found by Coverity (CID 259713).
2018-01-25 10:31:22 +03:00
Valentin Bartenev 477e8177b7 HTTP parser: restricting control chars in header fields values.
This also fixes an infinite loop here (found with honggfuzz).
2018-01-24 15:02:56 +03:00
Valentin Bartenev d1f29ed77e Python: fixed the "wsgi.errors" environment variable name.
This closes issue #76 on GitHub.
2018-01-19 19:45:11 +03:00
Valentin Bartenev 01ec9a5dba Ability to validate configuration options with multiple types. 2018-01-18 15:52:44 +03:00
Valentin Bartenev 0c38ff0e66 Checking for major HTTP version. 2018-01-15 20:50:20 +03:00
Valentin Bartenev a073616fc3 Improved HTTP version representation. 2018-01-15 20:50:14 +03:00
Valentin Bartenev 3fb140d6d2 HTTP parser: improved error reporting. 2018-01-15 20:49:59 +03:00
Valentin Bartenev 84eba82bc8 Version bump. 2018-01-15 18:37:07 +03:00
Valentin Bartenev 845b373bda Fixed reading of the rest of body, broken after 5817734dd9b9. 2018-01-12 21:36:24 +03:00
Valentin Bartenev e8aada94de HTTP parser: allowing underscore in header field names. 2018-01-09 16:50:47 +03:00
Valentin Bartenev c85c9dc7a8 Year 2018. 2018-01-01 16:31:07 +03:00
Valentin Bartenev cbab4939ec Removed 0.3 tag, again. 2017-12-28 20:56:16 +03:00
Valentin Bartenev 45d08d5145 HTTP parser: introduced nxt_http_parse_fields(). 2017-12-27 15:45:23 +03:00
Valentin Bartenev 95a9cb94d5 HTTP parser: fixed memory overflow in the collisions test.
The level hash uses the NULL value as the indicator of a free entry in a bucket.
So, inserting a NULL value breaks the hash and can lead to a bucket overflow.

In case of the collision counter, the value wasn't initialized, since it's not
needed for the purpose of checking collisions.  As a result, it might contain
any garbage from the stack and in some rare cases the value was NULL.

Now the value is initilized.
2017-12-26 17:18:57 +03:00
Valentin Bartenev 8830d73261 HTTP parser: reworked header fields handling. 2017-12-25 17:04:22 +03:00
Valentin Bartenev 67d72d46f7 HTTP parser: improved detection of corrupted request line. 2017-12-08 19:18:00 +03:00
Valentin Bartenev 20d720dfc5 HTTP parser: slightly improved readability of code.
As suggested by Igor Sysoev.
2017-12-08 19:18:00 +03:00
Valentin Bartenev 4be9774540 Fixed protocol version string handling in router. 2017-12-07 17:02:05 +03:00
Valentin Bartenev 89a1c66dd0 Fixed crash on invalid JSON number. 2017-11-21 18:41:43 +03:00
Valentin Bartenev 5ed4d7b9dc Avoiding compilation on systems with no working shared memory. 2017-10-25 14:57:18 +03:00
Valentin Bartenev 03e18cf42f Fixed change log for version 0.2.
Records about Go were added by mistake.
The relevant patches haven't been committed yet.
2017-10-23 21:12:12 +03:00
Valentin Bartenev e7d81186b5 Fixed controller restarting.
Previously, stored configuration wasn't reread on controller
process restart, which resulted in segmentation fault.
2017-10-19 17:43:54 +03:00
Valentin Bartenev 39fd38a948 Fixed matching of empty version. 2017-10-19 17:26:56 +03:00
Valentin Bartenev 1c6d4d8cff Basic validation errors. 2017-10-10 19:46:58 +03:00
Valentin Bartenev e4bea2c75c Optimized application type handling. 2017-10-10 19:15:08 +03:00
Valentin Bartenev 93438a0d9e Fixed building with old GCC after the previous change. 2017-10-05 17:31:41 +03:00
Valentin Bartenev 096562c0b1 Improved applications versions handling. 2017-10-05 16:46:18 +03:00
Valentin Bartenev fcd141936c Version bump. 2017-10-02 17:10:12 +03:00
Valentin Bartenev d18113ab66 Changed "path" to "directory" in configure summary.
The "directory" is more specific term, similar to "file".
2017-09-26 17:53:21 +03:00
Valentin Bartenev 45c1d41f34 Removed fibers from compilation.
It's not used anyway, but breaks building with musl.

This closes issue #5 on GitHub.
2017-09-22 16:42:42 +03:00
Valentin Bartenev 6a78aedb7e README: added project name to the beginning.
Also, for prettier look in output of "cat" and "less" commands,
added an empty line at the end.
2017-09-19 19:05:03 +03:00
Valentin Bartenev aa7eefe557 Simplified the README file.
Detailed documentation was moved to a separate repository
in order to keep the main repository clean from lots of
documentation edits.

See: http://hg.nginx.org/unit-docs
2017-09-19 18:12:26 +03:00
Valentin Bartenev 75a6325656 Fixed memory leak caused by mempool related to request context.
The previous attempt of fixing this in e5a65b58101f hasn't been really
successful, because the actual memory leak was caused not by the request
parse context itself, but its memory pool.
2017-09-16 05:36:06 +03:00
Valentin Bartenev 90ae152ce0 Fixed port handlers arrays. 2017-09-15 14:38:22 +03:00
Valentin Bartenev 4953e5b5cb Configuration persistence.
Now configuration survives server reloads.
2017-09-10 06:22:15 +03:00
Valentin Bartenev 2c24b89844 README: fixed "hg clone" command. 2017-09-08 00:01:22 +03:00
Valentin Bartenev 67b8dd0387 README: added mention of the licence in the main section. 2017-09-07 23:59:10 +03:00
Valentin Bartenev 9e8328f758 README: added features list. 2017-09-06 22:37:07 +03:00
Valentin Bartenev 55fe80600c Controller: resending configuration to router after its restart.
Now router crash can be survived with less damage.
2017-08-30 03:10:13 +03:00
Valentin Bartenev f528cb393a Controller: waiting for router before start to accept connections.
Previously, reconfiguration might fail right after the daemon start
if the router process wasn't ready yet.
2017-08-30 03:10:13 +03:00
Valentin Bartenev e21dbf89e6 Controller: correct handling of missing router port.
There's no router port if the router process is just crashed
or hasn't started yet.
2017-08-30 03:09:06 +03:00
Valentin Bartenev 1a5ec7fd08 Improved reconfiguration requests serialization.
Previously, only applying of updated configuration was serialized,
while the changes themselves could be done in parallel on the same
configuration.  That resulted in inconsistent behaviour.
2017-08-28 10:20:40 +03:00
Valentin Bartenev 3ab49d14c0 Fixed nxt_job_file_read_data().
Obviously it should read data into the free region of buffer.
The "free" pointer is respectively shifted in the code below.
2017-08-28 10:20:40 +03:00
Valentin Bartenev 2caa5cb845 Fixed building by GCC after 924c70e5fd1f. 2017-08-24 19:51:13 +03:00
Valentin Bartenev 6e444a7959 Removed unused structure. 2017-08-22 17:37:58 +03:00
Valentin Bartenev e34c7567c7 Renamed configure options. 2017-08-21 17:06:32 +03:00
Valentin Bartenev 1ba2f44ad9 Introduced nxt_conf_get_array_element(). 2017-08-16 15:45:38 +03:00
Valentin Bartenev 95907e2912 Object mapping interface extended with more string types. 2017-08-16 15:45:12 +03:00
Valentin Bartenev 2dd8048bf9 Renamed nxt_str_copy() to nxt_str_cstrz(). 2017-08-16 15:43:02 +03:00
Valentin Bartenev 2614758c04 Fixed building on ppc. 2017-08-15 16:36:00 +03:00
Valentin Bartenev e2653f7ba5 Fixed building by GCC after 7d1017bd0f6c. 2017-08-13 15:58:44 +03:00
Valentin Bartenev 80deee3903 Controller: more HTTP headers and detailed JSON parsing errors. 2017-08-11 19:54:40 +03:00
Valentin Bartenev 8bb88aaf51 Fixed parsing of JSON encoded UTF-16 surrogate pairs. 2017-08-11 18:13:57 +03:00
Valentin Bartenev 70d73d633b Fixed JSON escape sequence parsing. 2017-08-08 22:20:01 +03:00
Valentin Bartenev 617da0d023 Fixed building without debug after c1ae75b4e17c and 6281674ecf4f. 2017-08-04 18:00:40 +03:00
Valentin Bartenev 578cd547c0 Fixed building without debug. 2017-07-21 15:20:45 +03:00
Valentin Bartenev ee5b018cc2 Configuration: improved declaration of short strings. 2017-07-18 18:00:19 +03:00
Valentin Bartenev a6c4ef7a10 Configuration: reduced memory consumption of long strings. 2017-07-18 18:00:19 +03:00
Valentin Bartenev f16510585f Configuration: reduced memory consumption. 2017-07-18 18:00:15 +03:00
Valentin Bartenev 9d707800b0 More accurate "packed" attribute declaration. 2017-07-18 17:13:40 +03:00
Valentin Bartenev beb4de21bb Removed NXT_PACKED from port structures.
That was added only to silence Valgrind, but it results in
unaligned access (which breaks Unit on ARM architecture).
2017-07-18 17:12:46 +03:00
Valentin Bartenev d669045b75 Fixed the previous commit. 2017-07-14 17:03:01 +03:00
Valentin Bartenev a937047cb8 Null-terminated user and group. 2017-07-14 16:08:21 +03:00
Valentin Bartenev 2be31e2ed6 Fixed style and building with NXT_DEBUG_MEMORY after 3578a7b7ace4. 2017-07-12 20:57:18 +03:00
Valentin Bartenev c38bcb7d70 Controller: proper reconfiguration requests handling.
Now controller serializes all reconfiguration requests
and waits for result from router.
2017-07-12 20:21:17 +03:00