aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Reduced the number of GET method constants.Ruslan Ermilov2015-11-30
|
* Increased the default "connection_pool_size" on 64-bit platforms.Valentin Bartenev2015-11-30
| | | | | The previous default of 256 bytes isn't enough and results in two allocations on each accepted connection, which is suboptimal.
* Style: unified request method checks.Ruslan Ermilov2015-11-06
|
* Core: enabled "include" inside http upstreams (ticket #635).Ruslan Ermilov2015-11-23
| | | | The directive already works inside stream upstream blocks.
* Upstream: fixed "no port" detection in evaluated upstreams.Ruslan Ermilov2015-11-21
| | | | | | If an upstream with variables evaluated to address without a port, then instead of a "no port in upstream" error an attempt was made to connect() which failed with EADDRNOTAVAIL.
* Used the pwritev() syscall for writing files where possible.Valentin Bartenev2015-11-17
| | | | It is more effective, because it doesn't require a separate lseek().
* Moved file writev() handling code to a separate function.Valentin Bartenev2015-11-17
| | | | No functional changes.
* Handled EINTR from write() and pwrite() syscalls.Valentin Bartenev2015-11-17
| | | | This is in addition to 6fce16b1fc10.
* Adjusted file->sys_offset after the write() syscall.Valentin Bartenev2015-11-17
| | | | | | | | | This fixes suboptimal behavior caused by surplus lseek() for sequential writes on systems without pwrite(). A consecutive read after write might result in an error on systems without pread() and pwrite(). Fortunately, at the moment there are no widely used systems without these syscalls.
* Version bump.Valentin Bartenev2015-11-17
|
* Realip: the $realip_remote_addr variable.Ruslan Ermilov2015-11-16
|
* HTTP/2: reused HEADERS and CONTINUATION frames buffers.Valentin Bartenev2015-11-13
|
* HTTP/2: fixed handling of output HEADERS frames.Valentin Bartenev2015-11-13
| | | | | | | | | | | | The HEADERS frame is always represented by more than one buffer since b930e598a199, but the handling code hasn't been adjusted. Only the first buffer of HEADERS frame was checked and if it had been sent while others had not, the rest of the frame was dropped, resulting in broken connection. Before b930e598a199, the problem could only be seen in case of HEADERS frame with CONTINUATION.
* HTTP/2: fixed invalid headers handling (ticket #831).Valentin Bartenev2015-11-13
| | | | | | The r->invalid_header flag wasn't reset once an invalid header appeared in a request, resulting in all subsequent headers in the request were also marked as invalid.
* Upstream: proxy_cache_convert_head directive.Roman Arutyunyan2015-11-11
| | | | | | The directive toggles conversion of HEAD to GET for cacheable proxy requests. When disabled, $request_method must be added to cache key for consistency. By default, HEAD is converted to GET as before.
* SSL: only select HTTP/2 using NPN if "http2" is enabled.Valentin Bartenev2015-11-05
| | | | | | OpenSSL doesn't check if the negotiated protocol has been announced. As a result, the client might force using HTTP/2 even if it wasn't enabled in configuration.
* HTTP/2: backed out 16905ecbb49e (ticket #822).Valentin Bartenev2015-11-05
| | | | | | | | | | | It caused inconsistency between setting "in_closed" flag and the moment when the last DATA frame was actually read. As a result, the body buffer might not be initialized properly in ngx_http_v2_init_request_body(), which led to a segmentation fault in ngx_http_v2_state_read_data(). Also it might cause start processing of incomplete body. This issue could be triggered when the processing of a request was delayed, e.g. in the limit_req or auth_request modules.
* Fixed ngx_parse_time() out of bounds access (ticket #821).Maxim Dounin2015-10-30
| | | | | | | | | The code failed to ensure that "s" is within the buffer passed for parsing when checking for "ms", and this resulted in unexpected errors when parsing non-null-terminated strings with trailing "m". The bug manifested itself when the expires directive was used with variables. Found by Roman Arutyunyan.
* Syslog: added "nohostname" option.Vladimir Homutov2015-10-26
| | | | | The option disables sending hostname in the syslog message header. This is useful with syslog daemons that do not expect it (tickets #677 and #783).
* HTTP/2: changed behavior of the "http2_max_field_size" directive.Valentin Bartenev2015-10-27
| | | | | | Now it limits only the maximum length of literal string (either raw or compressed) in HPACK request header fields. It's easier to understand and to describe in the documentation.
* HTTP/2: fixed spelling.Valentin Bartenev2015-10-27
|
* Version bump.Valentin Bartenev2015-10-27
|
* HTTP/2: simplified checking the END_STREAM flag.Valentin Bartenev2015-10-26
| | | | No functional changes.
* HTTP/2: improved the ngx_http_v2_integer_octets(v) macro.Valentin Bartenev2015-10-26
| | | | Previously, it didn't work well for 0, 127, and 128, returning less than needed.
* HTTP/2: fixed the NGX_HTTP_V2_MAX_FIELD macro.Valentin Bartenev2015-10-26
|
* HTTP/2: fixed splitting of response headers on CONTINUATION frames.Valentin Bartenev2015-09-28
| | | | | | | | Previous code has been based on assumption that the header block can only be splitted at the borders of individual headers. That wasn't the case and might result in emitting frames bigger than the frame size limit. The current approach is to split header blocks by the frame size limit.
* HTTP/2: introduced NGX_HTTP_V2_ENCODE_* macros.Valentin Bartenev2015-10-26
| | | | No functional changes.
* HTTP/2: simplified producing of the Last-Modified header.Valentin Bartenev2015-10-26
|
* HTTP/2: fixed header block size calculation.Valentin Bartenev2015-10-26
|
* HTTP/2: fix handling of connection errors.Piotr Sikora2015-10-01
| | | | | | | | | Previously, nginx worker would crash because of a double free if client disconnected or timed out before sending all headers. Found with afl-fuzz. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
* HTTP/2: fix indirect reprioritization.Piotr Sikora2015-10-01
| | | | | | | | | | | | | | | Previously, streams that were indirectly reprioritized (either because of a new exclusive dependency on their parent or because of removal of their parent from the dependency tree), didn't have their pointer to the parent node updated. This broke detection of circular dependencies and, as a result, nginx worker would crash due to stack overflow whenever such dependency was introduced. Found with afl-fuzz. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
* HTTP/2: reject self-dependent streams.Piotr Sikora2015-10-01
| | | | | | | | | | | | Per RFC7540, a stream cannot depend on itself. Previously, this requirement was enforced on PRIORITY frames, but not on HEADERS frames and due to the implementation details nginx worker would crash (stack overflow) while opening self-dependent stream. Found with afl-fuzz. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
* Core: read/write locks are also required by the Stream module.Piotr Sikora2015-10-23
| | | | Signed-off-by: Piotr Sikora <piotrsikora@google.com>
* HTTP/2: improved error handling while parsing integers.Valentin Bartenev2015-10-20
| | | | | The case when an integer is out of frame bounds should be checked first as a more accurate error.
* HTTP/2: improved HPACK integer parsing code readability.Ruslan Ermilov2015-10-20
| | | | No functional changes.
* Win32: timer_resolution now ignored with select.Maxim Dounin2015-10-20
| | | | | | As setitimer() isn't available on Windows, time wasn't updated at all if timer_resolution was used with the select event method. Fix is to ignore timer_resolution in such cases.
* Win32: fixed build with MinGW and MinGW-w64 gcc.Kouhei Sutou2015-10-17
| | | | | This change fixes the "comparison between signed and unsigned integer expressions" warning, introduced in 5e6142609e48 (1.9.4).
* Style: unneeded casts of cf->args->elts removed.Maxim Dounin2015-10-19
|
* Fixed variables prefix comparison.Maxim Dounin2015-10-19
| | | | | | | | Variable names are not null-terminated, so using ngx_strncmp() without extra length checks is wrong. Reported by Markus Linnala, http://mailman.nginx.org/pipermail/nginx-devel/2015-August/007211.html.
* Fixed handling of empty root.Maxim Dounin2015-10-19
| | | | | | | | | Previously, a configuration with "root" set to an empty string tried test a character at clcf->root.data[-1]. Additional test added to make sure this won't happen. Reported by Markus Linnala, see http://mailman.nginx.org/pipermail/nginx-devel/2015-August/007210.html.
* SSL: preserve default server context in connection (ticket #235).Maxim Dounin2015-10-19
| | | | | | | | | This context is needed for shared sessions cache to work in configurations with multiple virtual servers sharing the same port. Unfortunately, OpenSSL does not provide an API to access the session context, thus storing it separately. In collaboration with Vladimir Homutov.
* HTTP/2: fixed parsing of literal header fields without indexing.Valentin Bartenev2015-10-19
|
* SSL: handled long string truncation in ngx_ssl_error().Vladimir Homutov2015-10-07
| | | | | | If no space left in buffer after adding formatting symbols, error message could be left without terminating null. The fix is to output message using actual length.
* Stream: delete proxy connection timer after SSL handshake.Ruslan Ermilov2015-10-06
| | | | The timer remained active and could drop active SSL connection.
* Extract out version info function.Kurtis Nusbaum2015-07-12
| | | | | | | The code for displaying version info and configuration info seemed to be cluttering up the main function. I was finding it hard to read main. This extracts out all of the logic for displaying version and configuration info into its own function, thus making main easier to read.
* HTTP/2: fixed $server_protocol value (ticket #800).Valentin Bartenev2015-09-28
|
* SSL: compatibility with OpenSSL master branch.Maxim Dounin2015-09-24
| | | | | | | RAND_pseudo_bytes() is deprecated in the OpenSSL master branch, so the only use was changed to RAND_bytes(). Access to internal structures is no longer possible, so now we don't try to set SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS even if it's defined.
* Version bump.Maxim Dounin2015-09-24
|
* Style.Maxim Dounin2015-09-22
|
* Increased the default number of output buffers.Valentin Bartenev2015-09-15
| | | | | | | | | | | | | | | | Since an output buffer can only be used for either reading or sending, small amounts of data left from the previous operation (due to some limits) must be sent before nginx will be able to read further into the buffer. Using only one output buffer can result in suboptimal behavior that manifests itself in forming and sending too small chunks of data. This is particularly painful with SPDY (or HTTP/2) where each such chunk needs to be prefixed with some header. The default flow-control window in HTTP/2 is 64k minus one bytes. With one 32k output buffer this results is one byte left after exhausting the window. With two 32k buffers the data will be read into the second free buffer before sending, thus the minimum output is increased to 32k + 1 bytes which is much better.