Commit Graph

2073 Commits

Author SHA1 Message Date
Igor Sysoev 3fcda23f15 Style and comment fixes. 2017-06-23 13:28:39 +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
Igor Sysoev 5e73d93999 Optimizations in nxt_mp_create(). 2017-06-21 10:21:06 +03:00
Igor Sysoev d59e906c01 Fixed building with -DNXT_DEBUG_MEMORY=1 (broken in 10688b89aa16). 2017-06-21 10:20:41 +03:00
Valentin Bartenev accb489492 HTTP parser: reduced memory consumption of header fields list. 2017-06-20 22:32:13 +03:00
Igor Sysoev 1a22195830 Fixed errors in the previous changeset. 2017-06-20 19:59:12 +03:00
Igor Sysoev f888a5310c Using new memory pool implementation. 2017-06-20 19:49:17 +03:00
Igor Sysoev c7ab908c19 Fixed error in the previous changeset. 2017-06-20 13:56:28 +03:00
Igor Sysoev b1b9f621a4 Memory pools refactoring. 2017-06-19 16:26:19 +03:00
Igor Sysoev 7574c64992 nxt_event_conn_... functions and structures have been renamed
to nxt_conn_...
2017-06-14 15:18:52 +03:00
Igor Sysoev 3e2632688f Router: follow up to HTTP parser changes. 2017-06-14 15:18:43 +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
Igor Sysoev d0c72e0726 C99 style declaration of connection states. 2017-06-06 18:57:58 +03:00
Igor Sysoev 49e9049ed2 Optimization of kqueue event processing on connection close. 2017-06-06 18:57:52 +03:00
Igor Sysoev 71c906a512 The controller did not work because of changes in the previous
changeset.
2017-06-06 18:53:15 +03:00
Igor Sysoev 5bc011afad Skeleton of router configuration and request processing. 2017-05-31 15:26:45 +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
Igor Sysoev f5c3b1c637 A small rbtree delete fixup optimization.
Setting node color to black is not required here because
it is already black.  Besides in the original algorithm
the node pointer is discarded and the node is set to tree
root just to quit the loop.

Thanks to 洪志道 (Hong Zhi Dao).
2017-05-29 10:17:36 +03:00
Valentin Bartenev 5cca4b3ab7 Style and a trivial fix. 2017-05-26 20:30:51 +03:00
Igor Sysoev 4f9f463799 A small rbtree insert fixup optimization.
Thanks to 洪志道 (Hong Zhi Dao).
2017-05-26 19:12:47 +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
Max Romanov 952ec2e0ff Fixed building test on Solaris 2017-05-12 20:41:34 +03:00
Max Romanov f7b4bdfd89 Using shared memory to send data via nxt_port.
Usage:
    b = nxt_port_mmap_get_buf(task, port, size);
    b->mem.free = nxt_cpymem(b->mem.free, data, size);
    nxt_port_socket_write(task, port, NXT_PORT_MSG_DATA, -1, 0, b);
2017-05-12 20:32:41 +03:00
Igor Sysoev 1782c771fa Fixed error introduced in rev d3dfd7c497e8. 2017-05-12 15:42:23 +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
Max Romanov cfed068c1d Macros for atomic 'OR' and 'AND' operations introduced.
Compiler built-ins used, where possible. Necessary configure checks added.
New macros:
    nxt_atomic_or_fetch(ptr, val)
    nxt_atomic_and_fetch(ptr, val)

Syntax and behaviour is similar to __sync_or_and_fetch and __sync_and_and_fetch
GCC build-ins.
2017-04-21 16:55:13 +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
Igor Sysoev 60ae0314c0 Fixed building on MacOSX. 2017-04-11 15:59:17 +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
Igor Sysoev 3b8963da4d Event connection writing fixes. 2017-03-23 15:52:27 +03:00
Valentin Bartenev e4e617469a Some basic HTTP handling in controller. 2017-03-16 16:28:31 +03:00
Igor Sysoev e13cbdb439 Solaris compatibilty. 2017-03-14 19:52:57 +03:00
Igor Sysoev 5135fcea93 Adding CFLAGS to link commands to pass flags required by
AddressSanitizer.
2017-03-14 19:05:43 +03:00
Igor Sysoev 3a8a4744b8 Fixed building on FreeBSD. 2017-03-14 19:03:49 +03:00
Igor Sysoev 979108f0ef Importing memory cache pool changes from nJScript. 2017-03-14 19:02:30 +03:00