aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* HTTP/2: fixed undefined behavior in ngx_http_v2_huff_encode().Valentin Bartenev2016-02-12
| | | | | | | When the "pending" value is zero, the "buf" will be right shifted by the width of its type, which results in undefined behavior. Found by Coverity (CID 1352150).
* HTTP/2: implemented HPACK Huffman encoding for response headers.Valentin Bartenev2016-02-11
| | | | | | | This reduces the size of headers by over 30% on average. Based on the patch by Vlad Krasnov: http://mailman.nginx.org/pipermail/nginx-devel/2015-December/007682.html
* Dynamic modules: fixed a version mismatch message (ticket #898).Ruslan Ermilov2016-02-11
| | | | Based on a patch by Takashi Takizawa.
* Stream: initialize variable right before using it.Roman Arutyunyan2016-02-11
|
* Stream: removed useless typedef.Roman Arutyunyan2016-02-11
|
* Core: ngx_module_t compatibility with C++.Piotr Sikora2016-02-09
| | | | | | | | Changes to NGX_MODULE_V1 and ngx_module_t in 85dea406e18f (1.9.11) broke all modules written in C++, because ISO C++11 does not allow conversion from string literal to char *. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
* Version bump.Maxim Dounin2016-02-10
|
* Dynamic modules.Maxim Dounin2016-02-04
| | | | | | | | | | | | | | | | | | | The auto/module script is extended to understand ngx_module_link=DYNAMIC. When set, it links the module as a shared object rather than statically into nginx binary. The module can later be loaded using the "load_module" directive. New auto/module parameter ngx_module_order allows to define module loading order in complex cases. By default the order is set based on ngx_module_type. 3rd party modules can be compiled dynamically using the --add-dynamic-module configure option, which will preset ngx_module_link to "DYNAMIC" before calling the module config script. Win32 support is rudimentary, and only works when using MinGW gcc (which is able to handle exports/imports automatically). In collaboration with Ruslan Ermilov.
* Dynamic modules: dlopen() support.Maxim Dounin2016-02-04
|
* Dynamic modules: changed ngx_modules to cycle->modules.Maxim Dounin2016-02-04
|
* Dynamic modules: moved module-related stuff to separate files.Maxim Dounin2016-02-04
|
* HTTP/2: fixed possible buffer overrun (ticket #893).Valentin Bartenev2016-02-04
| | | | | | Due to greater priority of the unary plus operator over the ternary operator the expression didn't work as expected. That might result in one byte less allocation than needed for the HEADERS frame buffer.
* HTTP/2: fixed padding handling in HEADERS frame with CONTINUATION.Valentin Bartenev2016-02-02
|
* HTTP/2: fixed request length accounting.Valentin Bartenev2016-02-02
| | | | | Now it includes not only the received body size, but the size of headers block as well.
* HTTP/2: fixed excessive memory allocation for pool cleanup.Valentin Bartenev2016-02-02
|
* HTTP/2: removed unused field from ngx_http_v2_stream_t.Valentin Bartenev2016-02-02
|
* Resolver: style.Ruslan Ermilov2015-12-17
| | | | | Use the original query name in error and debug messages when processing PTR responses.
* Resolver: improved PTR response processing.Ruslan Ermilov2015-12-17
| | | | | | | | | | | | | | The previous code only parsed the first answer, without checking its type, and required a compressed RR name. The new code checks the RR type, supports responses with multiple answers, and doesn't require the RR name to be compressed. This has a side effect in limited support of CNAME. If a response includes both CNAME and PTR RRs, like when recursion is enabled on the server, PTR RR is handled. Full CNAME support in PTR response is not implemented in this change.
* Resolver: style.Ruslan Ermilov2015-12-17
| | | | Renamed argument in ngx_resolver_process_a() for consistency.
* Resolver: free TCP buffers on resolver cleanup.Roman Arutyunyan2016-02-02
|
* Resolver: fixed possible resource leak introduced in 5a16d40c63de.Ruslan Ermilov2016-02-02
| | | | Found by Coverity (CID 1351175).
* Resolver: TCP support.Roman Arutyunyan2016-01-28
| | | | Resend DNS query over TCP once UDP response came truncated.
* Resolver: per-request DNS server balancer.Roman Arutyunyan2016-01-28
| | | | | | | | | | | Previously, a global server balancer was used to assign the next DNS server to send a query to. That could lead to a non-uniform distribution of servers per request. A request could be assigned to the same dead server several times in a row and wait longer for a valid server or even time out without being processed. Now each query is sent to all servers sequentially in a circle until a response is received or timeout expires. Initial server for each request is still globally balanced.
* Resolver: renamed UDP-specific structures, fields and variables.Roman Arutyunyan2016-01-28
| | | | They will be used for TCP connections as well.
* Resolver: removed unused field from ngx_resolver_ctx_t.Roman Arutyunyan2016-01-28
|
* Version bump.Roman Arutyunyan2016-01-28
|
* Resolver: limited CNAME recursion.Ruslan Ermilov2016-01-26
| | | | Previously, the recursion was only limited for cached responses.
* Resolver: fixed use-after-free memory accesses with CNAME.Roman Arutyunyan2016-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | When several requests were waiting for a response, then after getting a CNAME response only the last request's context had the name updated. Contexts of other requests had the wrong name. This name was used by ngx_resolve_name_done() to find the node to remove the request context from. When the name was wrong, the request could not be properly cancelled, its context was freed but stayed linked to the node's waiting list. This happened e.g. when the first request was aborted or timed out before the resolving completed. When it completed, this triggered a use-after-free memory access by calling ctx->handler of already freed request context. The bug manifests itself by "could not cancel <name> resolving" alerts in error_log. When a request was responded with a CNAME, the request context kept the pointer to the original node's rn->u.cname. If the original node expired before the resolving timed out or completed with an error, this would trigger a use-after-free memory access via ctx->name in ctx->handler(). The fix is to keep ctx->name unmodified. The name from context is no longer used by ngx_resolve_name_done(). Instead, we now keep the pointer to resolver node to which this request is linked. Keeping the original name intact also improves logging.
* Resolver: changed the ngx_resolver_create_*_query() arguments.Roman Arutyunyan2016-01-26
| | | | | | No functional changes. This is needed by the following change.
* Resolver: fixed CNAME processing for several requests.Ruslan Ermilov2016-01-26
| | | | | | When several requests were waiting for a response, then after getting a CNAME response only the last request was properly processed, while others were left waiting.
* Resolver: fixed crashes in timeout handler.Ruslan Ermilov2016-01-26
| | | | | | | | | | | | | | | | | If one or more requests were waiting for a response, then after getting a CNAME response, the timeout event on the first request remained active, pointing to the wrong node with an empty rn->waiting list, and that could cause either null pointer dereference or use-after-free memory access if this timeout expired. If several requests were waiting for a response, and the first request terminated (e.g., due to client closing a connection), other requests were left without a timeout and could potentially wait indefinitely. This is fixed by introducing per-request independent timeouts. This change also reverts 954867a2f0a6 and 5004210e8c78.
* Resolver: fixed possible segmentation fault on DNS format error.Roman Arutyunyan2016-01-26
|
* Request body: removed surplus assigment, no functional changes.Valentin Bartenev2016-01-12
| | | | | Setting rb->bufs to NULL is surplus after ngx_http_write_request_body() has returned NGX_OK.
* Core: worker_cpu_affinity auto.Maxim Dounin2016-01-11
| | | | | | | | | | | If enabled, workers are bound to available CPUs, each worker to once CPU in order. If there are more workers than available CPUs, remaining are bound in a loop, starting again from the first available CPU. The optional mask parameter defines which CPUs are available for automatic binding. In collaboration with Vladimir Homutov.
* Upstream: fixed changing method on X-Accel-Redirect.Maxim Dounin2016-01-11
| | | | | | | Previously, only r->method was changed, resulting in handling of a request as GET within nginx itself, but not in requests to proxied servers. See http://mailman.nginx.org/pipermail/nginx/2015-December/049518.html.
* Upstream: don't keep connections on early responses (ticket #669).Maxim Dounin2015-12-17
|
* Fixed PROXY protocol on IPv6 sockets (ticket #858).Maxim Dounin2015-12-17
|
* Version bump.Maxim Dounin2015-12-17
|
* Fixed fastcgi_pass with UNIX socket and variables (ticket #855).Ruslan Ermilov2015-12-09
| | | | This was broken in a93345ee8f52 (1.9.8).
* Version bump.Ruslan Ermilov2015-12-09
|
* Slice filter: terminate first slice with last_in_chain flag.Roman Arutyunyan2015-12-08
| | | | | This flag makes sub filter flush buffered data and optimizes allocation in copy filter.
* Slice filter: never run subrequests when main request is buffered.Roman Arutyunyan2015-12-08
| | | | | | | With main request buffered, it's possible, that a slice subrequest will send output before it. For example, while main request is waiting for aio read to complete, a slice subrequest can start an aio operation as well. The order in which aio callbacks are called is undetermined.
* SSL: fixed possible segfault on renegotiation (ticket #845).Sergey Kandaurov2015-12-08
| | | | | | | | Skip SSL_CTX_set_tlsext_servername_callback in case of renegotiation. Do nothing in SNI callback as in this case it will be supplied with request in c->data which isn't expected and doesn't work this way. This was broken by b40af2fd1c16 (1.9.6) with OpenSSL master branch and LibreSSL.
* Slice filter.Roman Arutyunyan2015-12-07
| | | | | | | | | | | | | | | | | | | | | | Splits a request into subrequests, each providing a specific range of response. The variable "$slice_range" must be used to set subrequest range and proper cache key. The directive "slice" sets slice size. The following example splits requests into 1-megabyte cacheable subrequests. server { listen 8000; location / { slice 1m; proxy_cache cache; proxy_cache_key $uri$is_args$args$slice_range; proxy_set_header Range $slice_range; proxy_cache_valid 200 206 1h; proxy_pass http://127.0.0.1:9000; } }
* Upstream: fill r->headers_out.content_range from upstream response.Roman Arutyunyan2015-12-07
|
* Core: fix typo in error message.Piotr Sikora2015-12-02
| | | | Signed-off-by: Piotr Sikora <piotrsikora@google.com>
* Style: NGX_PTR_SIZE replaced with sizeof(void *).Maxim Dounin2015-12-03
| | | | | The NGX_PTR_SIZE macro is only needed in preprocessor directives where it's not possible to use sizeof().
* Style.Maxim Dounin2015-12-02
|
* Stop emulating a space character after r->method_name.Ruslan Ermilov2015-11-30
| | | | | | | This is an API change. The proxy module was modified to not depend on this in 44122bddd9a1. No known third-party modules seem to depend on this.
* Proxy: improved code readability.Ruslan Ermilov2015-11-06
| | | | | | | | | Do not assume that space character follows the method name, just pass it explicitly. The fuss around it has already proved to be unsafe, see bbdb172f0927 and http://mailman.nginx.org/pipermail/nginx-ru/2013-January/049692.html for details.