Commit Graph
100 Commits
Author SHA1 Message Date
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
Valentin Bartenev dc874cd22e Configuration: improved validation. 2017-07-10 18:53:36 +03:00
Valentin Bartenev eb4c2e4a21 Configuration: nxt_conf_map_object() improvements. 2017-07-10 17:55:51 +03:00
Valentin Bartenev c0674de78d Controller: passing full configuration to router. 2017-07-10 17:55:44 +03:00
Valentin Bartenev fd0a4ff064 Configuration: basic schema validation for applications. 2017-07-07 20:37:43 +03:00
Valentin Bartenev fc9f73bbea Controller: relaxed JSON parser.
Now it allows commas after the last elements in objects and arrays,
as it's a common Igor's mistake.
2017-07-07 18:09:15 +03:00
Valentin Bartenev c9fbd832ab Controller: sending JSON configuration to router. 2017-07-06 22:52:05 +03:00
Valentin Bartenev 22d73057d9 Fixed mapping of int32_t in nxt_conf_map_object(). 2017-07-06 22:50:38 +03:00
Valentin Bartenev 842aa9ab46 Configuration: basic validation of schema. 2017-07-05 18:44:43 +03:00
Valentin Bartenev e4afc6ae98 Controller: fixed reading of request body. 2017-06-28 22:48:13 +03:00
Valentin Bartenev 53074c3b29 Configuration: reduced names of structures, functions, and macros. 2017-06-28 18:56:33 +03:00
Valentin Bartenev dfd3cc8c0e Applied nxt_pointer_to() and nxt_value_at() where possible. 2017-06-27 17:27:18 +03:00
Valentin Bartenev f86c803098 Interface for mapping JSON configuration objects to C structures. 2017-06-26 21:41:58 +03:00
Valentin Bartenev 01517e37c1 Simplified nxt_conf_json_object_get_member(). 2017-06-26 20:22:57 +03:00
Valentin Bartenev 9399a04121 Configuration printing functions splitted in two parts.
Requested by Igor.
2017-06-23 23:28:37 +03:00
Valentin Bartenev 72429410f7 Renames and reordering of parameters in configuration parser functions.
Requested by Igor.
2017-06-23 20:54:07 +03:00
Valentin Bartenev fa94dc7782 Configuration: fixed parsing of JSON literals. 2017-06-23 17:35:06 +03:00
Valentin Bartenev 9593ce769a Removed surplus type casting from nxt_memcmp() calls. 2017-06-21 22:45:20 +03:00
Valentin Bartenev 58e24662da Fixed building by GCC 4.8 and older. 2017-06-21 22:35:41 +03:00
Valentin Bartenev accb489492 HTTP parser: reduced memory consumption of header fields list. 2017-06-20 22:32:13 +03:00
Valentin Bartenev db6642f374 HTTP parser: decoupled header fields processing. 2017-06-13 20:11:29 +03:00
Valentin Bartenev f6e7c2b6a6 HTTP parser: fixed handling header fields with missing colon. 2017-06-09 21:49:51 +03:00
Valentin Bartenev c5cd7e5e97 Fixed building by GCC 7 (broken in 0b10a73d4993). 2017-06-09 21:38:10 +03:00
Valentin Bartenev cb1624fa42 Fixed building with epoll (broken in 92b4984ca3c1). 2017-06-09 21:37:29 +03:00
Valentin Bartenev dee819daab HTTP parser: changed style of a comment.
As requested by Igor.
2017-05-31 14:35:33 +03:00
Valentin Bartenev c0bf729c8e Controller: support for partial PUT and DELETE operations. 2017-05-30 17:12:20 +03:00
Valentin Bartenev 5cca4b3ab7 Style and a trivial fix. 2017-05-26 20:30:51 +03:00
Valentin Bartenev 48155f3a49 Optimized internal representation of JSON objects and arrays. 2017-05-23 14:02:37 +03:00
Valentin Bartenev c7be5bd6ae Controller: partial retrieving of configuration. 2017-05-18 20:40:19 +03:00
Valentin Bartenev dc95b2f3de Controller: pretty-printing of JSON responses. 2017-05-16 22:02:01 +03:00
Valentin Bartenev 0ca2c2fce2 Controller: trivial abilities to save and request configuration.
Now you can get current configuration with:

   $ curl 127.0.0.1:8443

and put new configuration with:

   $ curl -X PUT -d @conf.json 127.0.0.1:8443
2017-05-15 22:39:53 +03:00
Valentin Bartenev 9d16e1808b Added one more missing "fall through" comment in tests. 2017-05-10 19:26:56 +03:00
Valentin Bartenev ed38d86abb Added missing "fall through" comments to make GCC 7 happy. 2017-05-10 19:19:14 +03:00
Valentin Bartenev 558d1f8687 HTTP parser: fixed minimum length optimization in headers hash. 2017-04-25 16:57:14 +03:00
Valentin Bartenev 6e7f98d6ae Fixed overflow detection in number parsing functions. 2017-04-10 03:43:00 +03:00
Valentin Bartenev e0881fd85c The nxt_expect() macro. 2017-04-11 19:28:23 +03:00
Valentin Bartenev cddbab6312 JSON output in controller. 2017-04-11 00:29:47 +03:00
Valentin Bartenev 6af2d1cfc6 JSON parser: fixed missing initialization of short string length. 2017-04-11 00:29:29 +03:00
Valentin Bartenev b01865c023 Style and micro-optimizations in JSON parsing. 2017-04-10 23:04:34 +03:00
Valentin Bartenev 3d9be969e7 Removed unused nxt_lvlhsh_ctx_t. 2017-04-10 17:25:52 +03:00
Valentin Bartenev bf401fa544 JSON parsing in controller. 2017-04-10 17:06:22 +03:00
Valentin Bartenev e4e617469a Some basic HTTP handling in controller. 2017-03-16 16:28:31 +03:00
Valentin Bartenev 5745e48264 More optimizations of HTTP parser.
SSE 4.2 code removed, since loop unrolling gives better results.
2017-03-08 00:38:52 +03:00