summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-09-15SSL: session id context now includes certificate hash.Maxim Dounin1-2/+96
This prevents inappropriate session reuse in unrelated server{} blocks, while preserving ability to restore sessions on other servers when using TLS Session Tickets. Additionally, session context is now set even if there is no session cache configured. This is needed as it's also used for TLS Session Tickets. Thanks to Antoine Delignat-Lavaud and Piotr Sikora.
2014-09-13Access log: fixed the "if=" parameter with buffering (ticket #625).Valentin Bartenev1-21/+20
It might not work if there were more than one "access_log" directives pointed to the same file and duplicate buffer parameters.
2014-09-12Upstream: limited next_upstream time and tries (ticket #544).Roman Arutyunyan8-2/+127
The new directives {proxy,fastcgi,scgi,uwsgi,memcached}_next_upstream_tries and {proxy,fastcgi,scgi,uwsgi,memcached}_next_upstream_timeout limit the number of upstreams tried and the maximum time spent for these tries when searching for a valid upstream.
2014-09-12Upstream: included backup peers into peer.tries.Roman Arutyunyan2-12/+6
Since peer.tries is never reset it can now be limited if required.
2014-09-11Upstream keepalive: removed "single" parameter remnants.Maxim Dounin1-20/+1
The "single" parameter is deprecated and ignored since 5b5c07dee156 (1.3.2).
2014-09-11Added warning about unset cache keys.Maxim Dounin3-0/+15
In fastcgi, scgi and uwsgi modules there are no default cache keys, and using a cache without a cache key set is likely meaningless.
2014-09-11Style.Maxim Dounin2-2/+4
2014-08-13Upstream: avoided directly terminating the connection.FengGu1-0/+5
When memory allocation failed in ngx_http_upstream_cache(), the connection would be terminated directly in ngx_http_upstream_init_request(). Return a INTERNAL_SERVER_ERROR response instead.
2014-09-08Added ngx_init_setproctitle() return code check.Maxim Dounin2-3/+5
The ngx_init_setproctitle() function, as used on systems without setproctitle(3), may fail due to memory allocation errors, and therefore its return code needs to be checked. Reported by Markus Linnala.
2014-09-08Fixed ETag memory allocation error handling.Maxim Dounin1-0/+1
The etag->hash must be set to 0 to avoid an empty ETag header being returned with the 500 Internal Server Error page after the memory allocation failure. Reported by Markus Linnala.
2014-09-08Core: ngx_regex_compile() error handling fixes.Maxim Dounin1-3/+11
Now we actually return NGX_ERROR on errors, and provide an error string for memory allocation errors. Reported by Markus Linnala.
2014-09-03SSL: guard use of all SSL options for bug workarounds.Piotr Sikora1-0/+17
Some of the OpenSSL forks (read: BoringSSL) started removing unused, no longer necessary and/or not really working bug workarounds along with the SSL options and defines for them. Instead of fixing nginx build after each removal, be proactive and guard use of all SSL options for bug workarounds. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-09-05Upstream: suppressed the file cache slab allocator error messages.Roman Arutyunyan1-0/+4
The messages "ngx_slab_alloc() failed: no memory in cache keys zone" from the file cache slab allocator are suppressed since the allocation is likely to succeed after the forced expiration of cache nodes. The second allocation failure is reported.
2014-09-01Events: processing of posted events changed from LIFO to FIFO.Valentin Bartenev14-53/+48
In theory, this can provide a bit better distribution of latencies. Also it simplifies the code, since ngx_queue_t is now used instead of custom implementation.
2014-09-01Events: removed broken thread support from posted events.Valentin Bartenev20-454/+64
It's mostly dead code. And the idea of thread support for this task has been deprecated.
2014-09-01Mail: initialize the "signature" field of ngx_mail_session_t.Valentin Bartenev1-0/+2
Currently it isn't used, but it can be suitable to distinguish objects stored in c->data.
2014-09-01Upstream: improved configuration parser diagnostics.Ruslan Ermilov1-5/+13
Made it clear when the selected balancing method does not support certain parameters of the "server" directive.
2014-08-29Headers filter: "add_header" with "always" parameter (ticket #98).Sergey Kandaurov1-13/+41
If specified, the header field is set regardless of the status code.
2014-08-27Variables: updated list of prefixes in ngx_http_rewrite_set().Maxim Dounin1-1/+5
2014-08-27Variables: fixed non-indexed access of prefix vars (ticket #600).Maxim Dounin1-2/+5
Previously, a configuration like location / { ssi on; ssi_types *; set $http_foo "bar"; return 200 '<!--#echo var="http_foo" -->\n'; } resulted in NULL pointer dereference in ngx_http_get_variable() as the variable was explicitly added to the variables hash, but its get_handler wasn't properly set in the hash. Fix is to make sure that get_handler is properly set by ngx_http_variables_init_vars().
2014-08-18SPDY: added a comment about handling stream with the timer set.Valentin Bartenev1-0/+5
2014-08-27SPDY: avoid setting timeout on stream events in ngx_http_writer().Valentin Bartenev1-0/+6
The SPDY module doesn't expect timers can be set on stream events for reasons other than delaying output. But ngx_http_writer() could add timer on write event if the delayed flag wasn't set and nginx is waiting for AIO completion. That could cause delays in sending response over SPDY when file AIO was used.
2014-08-19Resolver: notify all waiting requests on timeout.Ruslan Ermilov1-8/+16
If a "resolver_timeout" occurs, only the first waiting request was notified. Other requests may hang forever.
2014-08-26Stub status: corrected the "stub_status" directive.Ruslan Ermilov1-1/+1
The "stub_status" directive does not require an argument.
2014-08-25Sub filter: fixed matching for a single character.Valentin Bartenev1-0/+8
2014-08-20Mail: fixed number of arguments allowed in the listen directive.Valentin Bartenev1-1/+1
2014-08-20Mail: fixed a comment.Valentin Bartenev1-2/+1
There's no loc_conf in the mail module.
2014-08-19Mp4: use trak->smhd_size in ngx_http_mp4_read_smhd_atom().Roman Arutyunyan1-1/+1
Reported by Gang Li.
2014-08-18Image filter: downgrade strong etags to weak ones as needed.Sergey Kandaurov1-0/+1
2014-08-15Fixed typo.Sergey Kandaurov1-1/+1
2014-08-10Events: removed unused variable in ngx_poll_process_events().Maxim Dounin1-4/+1
2014-08-07Events: format specifier fixes.Yves Crespin2-6/+6
2014-08-07Events: changed nevents type to unsigned in poll module.Yves Crespin1-6/+6
2014-08-06Style: use specified macro instead of magic-number.Tatsuhiko Kubo1-1/+1
2014-06-19Perl: NULL-terminate argument list.Piotr Sikora1-1/+2
perl_parse() function expects argv/argc-style argument list, which according to the C standard must be NULL-terminated, that is: argv[argc] == NULL. This change fixes a crash (SIGSEGV) that could happen because of the buffer overrun during perl module initialization. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-08-06Access log: allowed logs to syslog with "if=" (ticket #596).Maxim Dounin1-11/+6
2014-08-05Version bump.Maxim Dounin1-2/+2
2014-08-05Mail: discard pipelined commands after SMTP STARTTLS.Maxim Dounin1-0/+3
The bug had appeared in nginx 1.5.6 (04e43d03e153). Reported by Chris Boulton.
2014-08-01Core: exit on ngx_pnalloc() failure.Piotr Sikora1-0/+4
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-08-03Style: use ngx_free() instead of free().Tatsuhiko Kubo1-1/+1
2014-08-01Core: improved ngx_pstrdup() error handling.Tatsuhiko Kubo1-0/+3
2014-08-01Status: indentation and style, no functional changes.Sergey Kandaurov1-7/+9
2014-07-30Dav: ngx_http_map_uri_to_path() errors were not checked.FengGu1-4/+16
Once error occured, it could lead to use uninitialized variables to log, even more segmentation fault.
2014-07-30SSL: let it build against LibreSSL.Piotr Sikora1-3/+3
LibreSSL developers decided that LibreSSL is OpenSSL-2.0.0, so tests for OpenSSL-1.0.2+ are now passing, even though the library doesn't provide functions that are expected from that version of OpenSSL. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-30SSL: let it build against BoringSSL.Piotr Sikora1-0/+10
This change adds support for using BoringSSL as a drop-in replacement for OpenSSL without adding support for any of the BoringSSL-specific features. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-28SSL: fix build with OPENSSL_NO_ENGINE and/or OPENSSL_NO_OCSP.Piotr Sikora3-1/+15
This is really just a prerequisite for building against BoringSSL, which doesn't provide either of those features. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-28Bigger iovec buffer in ngx_readv_chain().Maxim Dounin1-1/+5
This helps to reduce likelyhood of memory allocations in ngx_readv_chain(), which are known to lead to noticeable effects in some cases, see http://mailman.nginx.org/pipermail/nginx/2014-July/044512.html.
2014-07-28SSL: misplaced space in debug message.Maxim Dounin1-1/+1
2014-07-28Upstream: SSL handshake timeouts.Maxim Dounin1-0/+5
Timeout may not be set on an upstream connection when we call ngx_ssl_handshake() in ngx_http_upstream_ssl_init_connection(), so make sure to arm it if it's not set. Based on a patch by Yichun Zhang.
2014-07-25GeoIP: not all variable fields were initialized.Yichun Zhang1-0/+6
The ngx_http_geoip_city_float_variable and ngx_http_geoip_city_int_variable functions did not always initialize all variable fields like "not_found", which could lead to empty values for those corresponding nginx variables randomly.