summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2015-11-17nginx-1.9.7-RELEASErelease-1.9.7Maxim Dounin1-0/+76
2015-11-16Realip: the $realip_remote_addr variable.Ruslan Ermilov1-1/+71
2015-11-13HTTP/2: reused HEADERS and CONTINUATION frames buffers.Valentin Bartenev2-10/+21
2015-11-13HTTP/2: fixed handling of output HEADERS frames.Valentin Bartenev1-6/+19
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.
2015-11-13HTTP/2: fixed invalid headers handling (ticket #831).Valentin Bartenev1-0/+2
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.
2015-11-11Upstream: proxy_cache_convert_head directive.Roman Arutyunyan3-1/+13
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.
2015-11-05SSL: only select HTTP/2 using NPN if "http2" is enabled.Valentin Bartenev1-10/+16
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.
2015-11-05HTTP/2: backed out 16905ecbb49e (ticket #822).Valentin Bartenev1-3/+5
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.
2015-10-30Fixed ngx_parse_time() out of bounds access (ticket #821).Maxim Dounin1-1/+1
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.
2015-10-26Syslog: added "nohostname" option.Vladimir Homutov2-1/+10
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).
2015-10-27HTTP/2: changed behavior of the "http2_max_field_size" directive.Valentin Bartenev2-21/+13
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.
2015-10-27HTTP/2: fixed spelling.Valentin Bartenev1-2/+2
2015-10-27Version bump.Valentin Bartenev1-2/+2
2015-10-27release-1.9.6 tagMaxim Dounin1-0/+1
2015-10-27nginx-1.9.6-RELEASErelease-1.9.6Maxim Dounin1-0/+84
2015-10-26HTTP/2: simplified checking the END_STREAM flag.Valentin Bartenev1-5/+3
No functional changes.
2015-10-26HTTP/2: improved the ngx_http_v2_integer_octets(v) macro.Valentin Bartenev1-1/+6
Previously, it didn't work well for 0, 127, and 128, returning less than needed.
2015-10-26HTTP/2: fixed the NGX_HTTP_V2_MAX_FIELD macro.Valentin Bartenev1-1/+2
2015-09-28HTTP/2: fixed splitting of response headers on CONTINUATION frames.Valentin Bartenev1-173/+158
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.
2015-10-26HTTP/2: introduced NGX_HTTP_V2_ENCODE_* macros.Valentin Bartenev1-11/+14
No functional changes.
2015-10-26HTTP/2: simplified producing of the Last-Modified header.Valentin Bartenev1-3/+2
2015-10-26HTTP/2: fixed header block size calculation.Valentin Bartenev1-1/+1
2015-10-01HTTP/2: fix handling of connection errors.Piotr Sikora1-6/+6
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>
2015-10-01HTTP/2: fix indirect reprioritization.Piotr Sikora1-4/+13
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>
2015-10-01HTTP/2: reject self-dependent streams.Piotr Sikora1-0/+16
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>
2015-10-23Core: read/write locks are also required by the Stream module.Piotr Sikora1-1/+1
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2015-10-23Configure: style fixes for autoconf.err.Piotr Sikora2-4/+14
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2015-10-20HTTP/2: improved error handling while parsing integers.Valentin Bartenev1-4/+4
The case when an integer is out of frame bounds should be checked first as a more accurate error.
2015-10-20HTTP/2: improved HPACK integer parsing code readability.Ruslan Ermilov1-3/+3
No functional changes.
2015-10-20Win32: timer_resolution now ignored with select.Maxim Dounin1-0/+9
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.
2015-10-17Win32: fixed build with MinGW and MinGW-w64 gcc.Kouhei Sutou1-1/+1
This change fixes the "comparison between signed and unsigned integer expressions" warning, introduced in 5e6142609e48 (1.9.4).
2015-10-19Style: unneeded casts of cf->args->elts removed.Maxim Dounin1-2/+2
2015-10-19Fixed variables prefix comparison.Maxim Dounin1-12/+26
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.
2015-10-19Fixed handling of empty root.Maxim Dounin1-1/+3
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.
2015-10-19SSL: preserve default server context in connection (ticket #235).Maxim Dounin2-12/+8
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.
2015-10-19HTTP/2: fixed parsing of literal header fields without indexing.Valentin Bartenev1-1/+1
2015-10-07SSL: handled long string truncation in ngx_ssl_error().Vladimir Homutov1-1/+1
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.
2015-10-06Stream: delete proxy connection timer after SSL handshake.Ruslan Ermilov1-0/+4
The timer remained active and could drop active SSL connection.
2015-07-12Extract out version info function.Kurtis Nusbaum1-58/+65
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.
2015-09-28HTTP/2: fixed $server_protocol value (ticket #800).Valentin Bartenev1-0/+2
2015-09-24SSL: compatibility with OpenSSL master branch.Maxim Dounin1-1/+3
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.
2015-09-24Version bump.Maxim Dounin1-2/+2
2015-09-22release-1.9.5 tagMaxim Dounin1-0/+1
2015-09-22nginx-1.9.5-RELEASErelease-1.9.5Maxim Dounin1-0/+97
2015-09-22Style.Maxim Dounin1-1/+2
2015-09-15Increased the default number of output buffers.Valentin Bartenev1-1/+1
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.
2015-09-22HTTP/2: fixed header block parsing with CONTINUATION frames (#792).Valentin Bartenev2-70/+136
It appears that the CONTINUATION frames don't need to be aligned to bounds of individual headers.
2015-09-22HTTP/2: fixed HPACK header field parsing.Valentin Bartenev1-0/+5
2015-09-21Sub filter: fixed initialization in http{} level (ticket #791).Roman Arutyunyan1-1/+2
If sub_filter directive was only specified at http{} level, sub filter internal data remained uninitialized. That would lead to a crash in runtime.
2015-09-11The HTTP/2 implementation (RFC 7240, 7241).Valentin Bartenev26-5701/+9250
The SPDY support is removed, as it's incompatible with the new module.