summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
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.
2015-09-11Core: fixed segfault with null in wildcard hash names.Maxim Dounin1-0/+4
A configuration like server { server_name .foo^@; } server { server_name .foo; } resulted in a segmentation fault during construction of server names hash. Reported by Markus Linnala. Found with afl-fuzz.
2015-09-11Fixed segfault with incorrect location nesting.Maxim Dounin2-2/+2
A configuration with a named location inside a zero-length prefix or regex location used to trigger a segmentation fault, as ngx_http_core_location() failed to properly detect if a nested location was created. Example configuration to reproduce the problem: location "" { location @foo {} } Fix is to not rely on a parent location name length, but rather check command type we are currently parsing. Identical fix is also applied to ngx_http_rewrite_if(), which used to incorrectly assume the "if" directive is on server{} level in such locations. Reported by Markus Linnala. Found with afl-fuzz.
2015-09-11Cache: check the whole cache key in addition to hashes.Maxim Dounin1-2/+19
This prevents a potential attack that discloses cached data if an attacker will be able to craft a hash collision between some cache key the attacker is allowed to access and another cache key with protected data. See http://mailman.nginx.org/pipermail/nginx-devel/2015-September/007288.html. Thanks to Gena Makhomed and Sergey Brester.
2015-09-03Upstream: fixed cache send error handling.Roman Arutyunyan1-11/+14
The value of NGX_ERROR, returned from filter handlers, was treated as a generic upstream error and changed to NGX_HTTP_INTERNAL_SERVER_ERROR before calling ngx_http_finalize_request(). This resulted in "header already sent" alert if header was already sent in filter handlers. The problem appeared in 54e9b83d00f0 (1.7.5).
2015-09-02Fixed building --with-debug, broken by 6fce16b1fc10.Valentin Bartenev1-1/+1
2015-09-02Writing to some file systems can be interrupted.Valentin Bartenev1-1/+12
At least such behavior was observed with CephFS, see: http://mailman.nginx.org/pipermail/nginx/2015-July/048188.html.
2015-08-31Decreased the NGX_HTTP_MAX_SUBREQUESTS limit.Valentin Bartenev1-1/+1
There is no much sense in such a big value since its semantics has been changed in 06e850859a26 to limit recursive subrequests.
2015-08-31Added protection against r->main->count overflow by subrequests.Valentin Bartenev2-1/+11
This overflow has become possible after the change in 06e850859a26, since concurrent subrequests are not limited now and each of them is counted in r->main->count.
2015-08-23Limit recursive subrequests instead of simultaneous.Valentin Bartenev2-5/+2
2015-08-23Version bump.Valentin Bartenev1-2/+2
2015-08-18release-1.9.4 tagMaxim Dounin1-0/+1
2015-08-18nginx-1.9.4-RELEASErelease-1.9.4Maxim Dounin1-0/+111
2015-08-18Perl: prototyping behavior explicitly specified.Maxim Dounin1-0/+3
When prototyping behavior is not explicitly specified, xsubpp emits a message to stderr asking to do so (see ticket #608).
2015-08-18Perl: fixed warning about "sep" may be used uninitialized.Maxim Dounin1-9/+6