summaryrefslogtreecommitdiffhomepage
path: root/src/core (follow)
AgeCommit message (Collapse)AuthorFilesLines
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-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-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-24Version bump.Maxim Dounin1-2/+2
2015-09-11The HTTP/2 implementation (RFC 7240, 7241).Valentin Bartenev1-1/+1
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-08-23Version bump.Valentin Bartenev1-2/+2
2015-08-13Core: fixed potential division by zero when initializing hash.Sergey Kandaurov1-0/+8
Found by Clang Static Analyzer.
2015-08-13Core: fixed style in the error message.Sergey Kandaurov1-1/+1
2015-08-11Core: idle connections now closed only once on exiting.Valentin Bartenev2-0/+21
Iterating through all connections takes a lot of CPU time, especially with large number of worker connections configured. As a result nginx processes used to consume CPU time during graceful shutdown. To mitigate this we now only do a full scan for idle connections when shutdown signal is received. Transitions of connections to idle ones are now expected to be avoided if the ngx_exiting flag is set. The upstream keepalive module was modified to follow this.
2015-08-11Fixed typo in the error message.Andrei Belov1-1/+1
2015-07-23Workaround for "configuration file test failed" under OpenVZ.Gena Makhomed1-4/+22
If nginx was used under OpenVZ and a container with nginx was suspended and resumed, configuration tests started to fail because of EADDRINUSE returned from listen() instead of bind(): # nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use) nginx: configuration file /etc/nginx/nginx.conf test failed With this change EADDRINUSE errors returned by listen() are handled similarly to errors returned by bind(), and configuration tests work fine in the same environment: # nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful More details about OpenVZ suspend/resume bug: https://bugzilla.openvz.org/show_bug.cgi?id=2470
2015-07-15Version bump.Maxim Dounin1-2/+2
2015-06-17Resolver: canceled resend timer on empty resend queues.Sergey Kandaurov1-0/+20
This is specifically useful on graceful shutdown.
2015-06-16Version bump.Vladimir Homutov1-2/+2
2015-05-14Core: store and dump processed configuration.Vladimir Homutov5-4/+88
If the -T option is passed, additionally to configuration test, configuration files are output to stdout. In the debug mode, configuration files are kept in memory and can be accessed using a debugger.
2015-06-16Core: added support for writing to stdout.Vladimir Homutov1-0/+7
2015-06-16Core: renamed ngx_proxy_protocol_parse to ngx_proxy_protocol_read.Roman Arutyunyan2-2/+2
The new name is consistent with the ngx_proxy_protocol_write function.
2015-06-16Stream: client-side PROXY protocol.Roman Arutyunyan2-0/+51
The new directive "proxy_protocol" toggles sending out PROXY protocol header to upstream once connection is established.
2015-06-11Moved ngx_http_parse_time() to core, renamed accordingly.Maxim Dounin3-0/+299
The function is now called ngx_parse_http_time(), and can be used by any code to parse HTTP-style date and time. In particular, it will be used for OCSP stapling. For compatibility, a macro to map ngx_http_parse_time() to the new name provided for a while.
2015-06-01Fixed excessive memory usage while parsing configuration.Valentin Bartenev1-1/+1
The b->pos points to the next symbol here. Reported by ilexshen.
2015-05-29Fixed bullying style of comments.Ruslan Ermilov1-4/+4
2015-05-29Version bump.Ruslan Ermilov1-2/+2
2015-05-20The "reuseport" option of the "listen" directive.Maxim Dounin3-0/+128
When configured, an individual listen socket on a given address is created for each worker process. This allows to reduce in-kernel lock contention on configurations with high accept rates, resulting in better performance. As of now it works on Linux and DragonFly BSD. Note that on Linux incoming connection requests are currently tied up to a specific listen socket, and if some sockets are closed, connection requests will be reset, see https://lwn.net/Articles/542629/. With nginx, this may happen if the number of worker processes is reduced. There is no such problem on DragonFly BSD. Based on previous work by Sepherosa Ziehau and Yingqi Lu.
2015-05-19Core: properly initialized written bytes counter in memory log.Valentin Bartenev1-1/+1
2015-04-28Fixed overflow detection in ngx_inet_addr().Valentin Bartenev1-5/+5
Overflow detection of the last octet might not work. Reported by Sergey Polovko.
2015-04-28Version bump.Valentin Bartenev1-2/+2
2015-04-27Win32: shared memory base addresses and remapping.Maxim Dounin1-0/+16
Two mechanisms are implemented to make it possible to store pointers in shared memory on Windows, in particular on Windows Vista and later versions with ASLR: - The ngx_shm_remap() function added to allow remapping of a shared memory zone to the address originally used for it in the master process. While important, it doesn't solve the problem by itself as in many cases it's not possible to use the address because of conflicts with other allocations. - We now create mappings at the same address in all processes by starting mappings at predefined addresses normally unused by newborn processes. These two mechanisms combined allow to use shared memory on Windows almost without problems, including reloads. Based on the patch by Sergey Brester: http://mailman.nginx.org/pipermail/nginx-devel/2015-April/006836.html
2015-04-27Win32: fixed shm.handle loss on reload.Maxim Dounin1-0/+3
2015-04-25Core: the ngx_set_connection_log() macro.Vladimir Homutov1-0/+11
The http and stream versions of this macro were identical.
2015-04-23Removed the "worker_rlimit_sigpending" directive.Ruslan Ermilov2-9/+0
It was only needed by the just removed rtsig module.
2015-04-23Removed the obsolete rtsig module.Ruslan Ermilov2-20/+7
2015-04-22Removed the obsolete aio module.Ruslan Ermilov2-2/+2
2015-04-20Core: allow shared memory size to be declared after a reference.Sergey Kandaurov1-0/+4
For example, this fixes the case when "proxy_cache_path" is specified after "proxy_cache" that references it.
2015-04-20Stream: port from NGINX+.Ruslan Ermilov2-2/+3
2015-03-26Removed "worker_threads" and "thread_stack_size" directives.Ruslan Ermilov2-37/+0
2015-03-26Removed unused thread-local-storage code.Ruslan Ermilov2-16/+0
2015-03-26Removed ngx_threaded and related code.Ruslan Ermilov1-37/+0
2015-04-16Core: ensure that ngx_config.h is always included first.Sergey Kandaurov1-0/+3
This fixes compilation of various 3rd party modules when nginx is configured with threads.
2015-04-16Version bump.Maxim Dounin1-2/+2
2015-04-14Upstream: the "zone" directive.Ruslan Ermilov3-1/+12
Upstreams with the "zone" directive are kept in shared memory, with a consistent view of all worker processes.
2015-03-21Core: read/write locks.Ruslan Ermilov3-0/+134
2015-04-16Fixed build, broken by 8b7f062a3fe6.Ruslan Ermilov1-1/+2
Casting a "const char *" to "char *" doesn't work on older gcc versions.
2015-04-16Core: added OpenSSL version information to "nginx -V" output.Vladimir Homutov1-5/+16
2015-04-16Version bump.Vladimir Homutov1-2/+2
2015-03-26Core: guard against spinlock usage without atomic ops.Ruslan Ermilov1-1/+1
The new thread pools code uses spinlocks.
2015-04-07Core: limited levels of subdirectory hierarchy used for temp files.Sergey Kandaurov1-0/+4
Similar to ngx_http_file_cache_set_slot(), the last component of file->name with a fixed length of 10 bytes, as generated in ngx_create_temp_path(), is used as a source for the names of intermediate subdirectories with each one taking its own part. Ensure that the sum of specified levels with slashes fits into the length (ticket #731).
2015-04-07Core: removed excessive initialization in ngx_conf_set_path_slot().Sergey Kandaurov1-4/+0
Level hierarchy is pre-zeroed in ngx_pcalloc() of the surrounding ngx_path_t.
2015-04-07Core: fixed error handling on ngx_conf_full_name() failure.Sergey Kandaurov1-1/+1