Igor Sysoev
794248090a
Legacy upstream code removed.
2020-03-04 14:04:08 +03:00
Igor Sysoev
643d4383fa
Refactored nxt_http_action.
2020-03-04 14:03:32 +03:00
Igor Sysoev
2d0dca5243
The kqueue EOF flag might be ignored on some conditions.
...
If kqueue reported both the EVFILT_READ and the EVFILT_WRITE events
for the socket but only the former had the EV_EOF flag set, the flag
was silently ignored.
2020-03-04 14:03:30 +03:00
Igor Sysoev
02e197e978
Processing inconsistent proxied response length.
...
Keepalive connection is disabled if upstream response length
differs from specified in the "Content-Length" field value.
2019-11-14 16:40:02 +03:00
Igor Sysoev
ddde9c23cf
Initial proxy support.
2019-11-14 16:39:54 +03:00
Igor Sysoev
57e326b411
Introduced chained buffer completion handlers.
2019-11-14 16:39:48 +03:00
Igor Sysoev
643c433f8e
Using event engine memory buffers in HTTP/1 layer.
2019-11-14 16:39:48 +03:00
Igor Sysoev
1ec6353733
Introduced event engine memory buffers.
2019-11-14 16:39:48 +03:00
Igor Sysoev
07c007af57
Event engine memory cache refactored.
2019-11-14 16:39:48 +03:00
Igor Sysoev
d4e3951c4d
Using request task.
2019-11-14 16:39:48 +03:00
Igor Sysoev
14e56fe8c8
Replacing pass with action.
2019-11-14 16:39:48 +03:00
Igor Sysoev
96cd6558ce
Fixed connect(2) errors processing on old Linuxes.
...
While connect(2) states that non-blocking connect should use EPOLLOUT:
EINPROGRESS
The socket is non-blocking and the connection cannot be completed
immediately. It is possible to select(2) or poll(2) for completion by
selecting the socket for writing. After select(2) indicates writability,
use getsockopt(2) to read the SO_ERROR option at level SOL_SOCKET to
determine whether connect() completed successfully (SO_ERROR is zero)
or unsuccessfully (SO_ERROR is one of the usual error codes listed here,
explaining the reason for the failure).
On connect error, Linux 2.6.32 (CentOS 6) may return EPOLLRDHUP, EPOLLERR,
EPOLLHUP, EPOLLIN, but not EPOLLOUT.
2019-11-14 16:39:48 +03:00
Igor Sysoev
09e7357b08
Style fixes.
2019-10-10 19:42:41 +03:00
Igor Sysoev
ec0d5c928e
Changed nxt_memcasecmp() interface to avoid casts.
2019-10-10 19:37:40 +03:00
Igor Sysoev
aa910b276e
Ignoring EINTR error in kqueue.
2019-10-03 16:13:13 +03:00
Igor Sysoev
2791c00cf2
Fixed error processing in SSL operations.
...
Before this fix EWOULDBLOCK error was fatal for SSL write operation.
This closes #325 issue on GitHub.
2019-09-30 17:17:31 +03:00
Igor Sysoev
e2abfaf381
Adding body handler to nxt_http_request_header_send().
2019-08-26 18:29:00 +03:00
Igor Sysoev
c7210eaa5a
nxt_h1proto_t definition was moved to h1proto implementation.
2019-08-06 15:29:40 +03:00
Igor Sysoev
17bb22a4e4
Refactored HTTP protocol callback table.
2019-08-06 15:29:39 +03:00
Igor Sysoev
a2c1907fda
Decreased level of some shutdown() and send() errors.
2019-06-18 18:01:03 +03:00
Igor Sysoev
1f8c395fc0
Cookie-based routing should be case-sensitive.
2019-06-10 18:47:35 +03:00
Igor Sysoev
6a775f58af
Added routing based on cookies.
2019-05-30 15:33:51 +03:00
Igor Sysoev
5fb3daa5af
Added routing based on arguments.
2019-05-30 15:33:51 +03:00
Igor Sysoev
16273cf1c6
Handling routing errors.
2019-05-30 15:33:51 +03:00
Igor Sysoev
0ba7cfce75
Added routing based on header fields.
2019-05-30 15:33:51 +03:00
Igor Sysoev
3aaebe4169
Fixed segfault with empty routes array.
2019-05-30 15:33:51 +03:00
Igor Sysoev
f2aa190f60
Fixed segfault with empty rule array.
2019-05-30 15:33:51 +03:00
Igor Sysoev
8339b15158
Added support for wildcards in the middle of match patterns.
2019-04-10 13:47:34 +03:00
Igor Sysoev
86d4a0e473
Fixed TLS connections hanging.
...
After event is delivered from the kernel its further processing is blocked.
Non-ready TSL I/O operation should mark connection I/O state as not ready
to unblock events and to allow their further processing. Otherwise
the connection hangs.
2019-03-01 18:20:05 +03:00
Igor Sysoev
834e8ca576
Fixed timer and event race condition.
...
When idle timeout occurs at the same time as a request comes in,
the timer handler closes connection while the read event triggers
request processing, and this eventually leads to segmentation fault.
2019-02-28 18:04:11 +03:00
Igor Sysoev
d4ccaae900
Initial routing implementation.
2019-02-27 16:41:11 +03:00
Igor Sysoev
95c9bba33b
Introduced nxt_memcpy_upcase().
2019-02-26 19:48:44 +03:00
Igor Sysoev
ce650ea0f7
Introduced nxt_conf_array_qsort().
2019-02-26 19:48:41 +03:00
Igor Sysoev
547082171e
Introduced nxt_conf_array_elements_count().
2019-02-26 19:48:38 +03:00
Igor Sysoev
444b9ffea9
Keepalive mode is disabled on HTTP header parsing errors.
2019-02-26 19:12:16 +03:00
Igor Sysoev
c96b2baca5
TLS certificates should be freed per listener.
...
This fixes memory leak if configuration uses more than one TLS cerificate.
2019-02-22 17:32:38 +03:00
Igor Sysoev
acb5b0aad7
Ignoring HUP signal in main process.
2019-02-18 18:34:20 +03:00
Igor Sysoev
bb11e9036f
Fixed memory leak on response body sending failure.
2019-02-18 17:28:55 +03:00
Igor Sysoev
fd6a6a5514
Fixed processing Unix listening socket failures.
...
This is related to issue #198 on GitHub.
2019-01-21 18:39:19 +03:00
Igor Sysoev
627b116c4d
Testing correct value.
2019-01-18 16:18:36 +03:00
Igor Sysoev
23a6a8e451
Testing correct value.
2019-01-18 16:18:36 +03:00
Igor Sysoev
92ddc15a84
Checking error states in I/O handlers.
2018-11-13 19:04:48 +03:00
Igor Sysoev
d4a99aad84
Backout of ba94959b1dec and improving epoll error handling.
2018-10-23 16:31:42 +03:00
Igor Sysoev
57991dc3f2
Fixed termination signal handlers in worker processes.
...
This closes #99 issue on GitHub.
Thanks to Julian Brost.
2018-10-22 17:43:31 +03:00
Igor Sysoev
50dd54877d
Improved epoll failures handling.
...
epoll changes are committed to the kernel before epoll_wait() or
on changes array overflow. In the latter case if there are errors
epoll_wait() timeout was not set to zero.
This commit is related to #173 issue on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).
2018-10-22 17:43:28 +03:00
Igor Sysoev
deeb276d23
Removed duplicate code in epoll.
...
This commit is related to #173 issue on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).
2018-10-22 16:25:58 +03:00
Igor Sysoev
b5d4fc939e
Disabled chunked transfer encoding for 204 responses.
2018-09-28 17:32:02 +03:00
Igor Sysoev
92da8dae1e
Fixed bug in socket write error handling.
...
The bug has been introduced in e3972a4a9c73.
2018-09-28 15:12:47 +03:00
Igor Sysoev
b5d76454ed
Added nginx error 497 response.
2018-09-20 15:05:38 +03:00
Igor Sysoev
96cd68b340
Added SSL/TLS support on connection level.
2018-09-20 15:05:37 +03:00
Igor Sysoev
7458f66dda
Fixed non-auto-reset timers.
2018-09-17 16:37:20 +03:00
Igor Sysoev
4bb4525031
Removed deprecated MacOSX OSSpinLockLock().
2018-09-17 16:37:17 +03:00
Igor Sysoev
74b69f5e95
Fixed typo.
...
This closes #166 issue on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).
2018-09-17 16:37:13 +03:00
Igor Sysoev
ab5b67b45d
Fixed typo.
...
This closes #165 issue on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).
2018-09-17 16:37:11 +03:00
Igor Sysoev
8654372842
Fixed segfault on listening socket close.
...
Now keep-alive connection sends 408 response if listening
socket was closed while reconfiguration.
2018-07-30 17:05:49 +03:00
Igor Sysoev
69a1169cae
Sending 408 response on idle connection timeout.
2018-07-30 17:05:48 +03:00
Igor Sysoev
12c890c1ca
Added OpenBSD 3.9 getthrid().
...
Prodded by David Carlier.
2018-07-27 16:57:45 +03:00
Igor Sysoev
7e41f9d108
Refactored thread ID functions.
...
nxt_thread_tid() was moved to src/nxt_thread.c
nxt_thread_get_tid() was moved to src/nxt_thread_id.h.
src/nxt_thread_id.c was removed.
2018-07-27 16:53:26 +03:00
Igor Sysoev
bd8eacf52d
Fixed socket write error handling.
2018-07-12 18:29:22 +03:00
Igor Sysoev
5de582f6db
Disabling keep-alive connection on errors.
2018-07-12 18:29:22 +03:00
Igor Sysoev
071412a9ae
Fixed bug in "send_timeout" handling.
2018-07-12 18:29:22 +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
51b37f0693
Using appropriate default modules and state directories.
2018-06-28 17:36:48 +03:00
Igor Sysoev
61df281464
Added check of "make install" ability.
...
This closes #136 issue on GitHub.
2018-06-28 17:36:42 +03:00
Igor Sysoev
606eda045b
Removed '\r' and '\n' artifact macros.
2018-06-25 16:56:45 +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
Igor Sysoev
ff6ca2a82c
Fixed keep-alive hanging after reconfiguration.
2018-05-30 18:46:05 +03:00
Igor Sysoev
e54fb892a4
PHP: fixed building on MacOSX with --ld-opt= option.
2018-05-30 18:31:26 +03:00
Igor Sysoev
d3356f7ad2
Added version number to main process title.
2018-05-29 19:51:27 +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
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
Igor Sysoev
c7e575d5c6
Introducing connection state io_read_handler.
2018-04-11 17:33:18 +03:00
Igor Sysoev
0be4f1f693
Keepalive processing optimization.
2018-04-11 17:33:16 +03:00
Igor Sysoev
1fab645246
Added "408 Request Timeout" error response.
2018-04-10 19:38:48 +03:00
Igor Sysoev
73bdb5ec09
Refactored HTTP header parsing.
2018-04-10 19:38:45 +03:00
Igor Sysoev
0a44ac371a
Splitting HTTP processing in more granulate connection states.
2018-04-10 19:30:45 +03:00
Igor Sysoev
fa04c05aa0
HTTP: using r->mem_pool retention counter for response buffers.
2018-04-03 16:28:26 +03:00
Igor Sysoev
5177b085b1
nxt_lvlhsh_each() refactoring and nxt_lvlhsh_each_init().
2018-03-29 16:35:42 +03:00
Igor Sysoev
5a9c23e2b4
Using nxt_lvlhsh_peek() for port hashes.
2018-03-29 16:35:38 +03:00
Igor Sysoev
7205bf4b86
Using nxt_lvlhsh_peek() and nxt_lvlhsh_retrieve().
2018-03-29 16:35:36 +03:00
Igor Sysoev
aad7752527
nxt_lvlhsh_retrieve().
2018-03-29 16:35:32 +03:00
Igor Sysoev
8a4c8d64b2
nxt_lvlhsh_peek().
2018-03-29 16:35:26 +03:00
Igor Sysoev
bd451a50a9
Removed unused macros and functions.
2018-03-29 16:35:03 +03:00
Igor Sysoev
18377ad288
nxt_port_buf_completion() and nxt_sendbuf_completion().
...
nxt_sendbuf_completion() has been renamed to nxt_port_buf_completion()
and moved to src/nxt_port_socket.c. nxt_sendbuf_completion0() has been
renamed to nxt_sendbuf_completion().
2018-03-28 19:10:02 +03:00
Igor Sysoev
cd340b09e6
Using more expressive name for field.
2018-03-28 19:09:56 +03:00
Igor Sysoev
bb8c285678
Using type for nxt_msec_diff().
2018-03-28 19:07:40 +03:00
Igor Sysoev
baf63dfe74
Aligned macosx-version-min flag for test and build environments.
...
The flag has been misaligned in the changeset 4979fe09d9cd.
2018-03-28 19:07:32 +03:00
Igor Sysoev
5365dadb4b
signalfd() notification should be ignored if nothing was read.
2018-02-12 20:09:13 +03:00
Igor Sysoev
11d5206866
Router: fixed freed memory access race condition.
2018-02-08 16:51:49 +03:00
Igor Sysoev
37a713c217
HTTP: fixed chunked response on 32-bit platforms.
2018-01-16 11:48:38 +03:00
Igor Sysoev
3cc529ddea
Added tag 0.4 for changeset 6071f4300f76
2018-01-15 18:00:48 +03:00
Igor Sysoev
ac433f1f30
Added version 0.4 CHANGES.
2018-01-15 15:05:25 +03:00
Igor Sysoev
a35732bf05
PHP: "--lib-static" option uses "--lib-path" option.
2018-01-15 15:05:22 +03:00
Igor Sysoev
c9ae198016
PHP: added "--lib-static" configure option.
...
The libraries returned by "php-config --libs" are required to link with
static libphp.a. Dynamic libphp.so contains the required libraries names.
2018-01-12 18:15:58 +03:00