Commit Graph

39 Commits

Author SHA1 Message Date
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
444b9ffea9 Keepalive mode is disabled on HTTP header parsing errors. 2019-02-26 19:12:16 +03:00
Valentin Bartenev
2d4697dbbe Validation and normalization of request host. 2019-02-19 20:25:25 +03:00
Valentin Bartenev
d54d806c52 Disabled chunked transfer encoding for 304 responses as well.
According to RFC 7232:

 | A 304 response cannot contain a message-body; it is always terminated
 | by the first empty line after the header fields.
2018-10-01 15:06:31 +03:00
Valentin Bartenev
3c2eddb183 Allowing keep-alive connections after 204 responses.
This was unintentionally disabled by 7b5026a0bdeb.
2018-10-01 15:06:31 +03:00
Igor Sysoev
b5d4fc939e Disabled chunked transfer encoding for 204 responses. 2018-09-28 17:32:02 +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
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
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
Valentin Bartenev
1a52d876f7 Introduced nxt_length() macro. 2018-06-25 16:51:47 +03:00
Igor Sysoev
ff6ca2a82c Fixed keep-alive hanging after reconfiguration. 2018-05-30 18:46:05 +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
Valentin Bartenev
204c394721 Initial access log support. 2018-04-11 18:23: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
Valentin Bartenev
dc75c83950 Fixed pipelined request processing, broken by 9e16499b63f0. 2018-04-11 12:49:58 +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
Valentin Bartenev
eb51264710 Processing of partially parsed HTTP header.
This is useful for log purposes.
2018-04-09 19:16:19 +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
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
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
Sergey Kandaurov
771e9d3cc3 Fixed formatting in nxt_sprintf() and logging. 2018-01-24 15:16:33 +03:00
Igor Sysoev
37a713c217 HTTP: fixed chunked response on 32-bit platforms. 2018-01-16 11:48:38 +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
845b373bda Fixed reading of the rest of body, broken after 5817734dd9b9. 2018-01-12 21:36:24 +03:00
Igor Sysoev
2fa203f2da HTTP: fixed large header buffers allocation and deallocation.
This closes #74 issue on GitHub.
2018-01-11 09:49:36 +03:00
Igor Sysoev
30a83a1159 Using correct pointer and size for memzero operation.
Found by Coverity (CID 215689).
2017-12-29 19:42:54 +03:00
Igor Sysoev
bcbe6df8af Corrected allocation size of HTTP response header. 2017-12-29 18:43:54 +03:00
Igor Sysoev
795a244bd0 Disabled Nagle algorithm for keep-alive connections. 2017-12-28 20:12:13 +03:00
Igor Sysoev
9a6d3c5775 HTTP keep-alive connections support. 2017-12-28 16:01:06 +03:00