aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Proxy: support for connection upgrade (101 Switching Protocols).Maxim Dounin2013-02-18
| | | | | | | | | | | | | | This allows to proxy WebSockets by using configuration like this: location /chat/ { proxy_pass http://backend; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } Connection upgrade is allowed as long as it was requested by a client via the Upgrade request header.
* Fixed false memset warning on Linux with -O3 (ticket #275).Maxim Dounin2013-02-13
| | | | Prodded by John Leach.
* Added support for {SHA} passwords (ticket #50).Maxim Dounin2013-02-07
| | | | | | | | | | | | Note: use of {SHA} passwords is discouraged as {SHA} password scheme is vulnerable to attacks using rainbow tables. Use of {SSHA}, $apr1$ or crypt() algorithms as supported by OS is recommended instead. The {SHA} password scheme support is added to avoid the need of changing the scheme recorded in password files from {SHA} to {SSHA} because such a change hides security problem with {SHA} passwords. Patch by Louis Opter, with minor changes.
* Version bump.Maxim Dounin2013-02-07
|
* GeoIP: removed pseudo-support of "proxy" and "netspeed" databases.Ruslan Ermilov2013-02-04
|
* FastCGI: proper handling of split fastcgi end request.Maxim Dounin2013-02-01
| | | | | | If fastcgi end request record was split between several network packets, with fastcgi_keep_conn it was possible that connection was saved in incorrect state (e.g. with padding bytes not yet read).
* FastCGI: unconditional state transitions.Maxim Dounin2013-02-01
| | | | | | Checks for f->padding before state transitions make code hard to follow, remove them and make sure we always do another loop iteration after f->state is set to ngx_http_fastcgi_st_padding.
* FastCGI: fixed wrong connection close with fastcgi_keep_conn.Maxim Dounin2013-02-01
| | | | | | | | | | With fastcgi_keep_conn it was possible that connection was closed after FCGI_STDERR record with zero padding and without any further data read yet. This happended as f->state was set to ngx_http_fastcgi_st_padding and then "break" happened, resulting in p->length being set to f->padding, i.e. 0 (which in turn resulted in connection close). Fix is to make sure we continue the loop after f->state is set.
* Request body: fixed client_body_in_file_only.Maxim Dounin2013-02-01
| | | | | | | | After introduction of chunked request body reading support in 1.3.9 (r4931), the rb->bufs wasn't set if request body was fully preread while calling the ngx_http_read_client_request_body() function. Reported by Yichun Zhang (agentzh).
* SSL: fixed ngx_ssl_handshake() with level-triggered event methods.Maxim Dounin2013-02-01
| | | | | | Missing calls to ngx_handle_write_event() and ngx_handle_read_event() resulted in a CPU hog during SSL handshake if an level-triggered event method (e.g. select) was used.
* SSL: take into account data in the buffer while limiting output.Valentin Bartenev2013-01-28
| | | | In some rare cases this can result in a more smooth sending rate.
* SSL: avoid calling SSL_write() with zero data size.Valentin Bartenev2013-01-28
| | | | | | | | | | | | According to documentation, calling SSL_write() with num=0 bytes to be sent results in undefined behavior. We don't currently call ngx_ssl_send_chain() with empty chain and buffer. This check handles the case of a chain with total data size that is a multiple of NGX_SSL_BUFSIZE, and with the special buffer at the end. In practice such cases resulted in premature connection close and critical error "SSL_write() failed (SSL:)" in the error log.
* SSL: calculation of buffer size moved closer to its usage.Valentin Bartenev2013-01-28
| | | | No functional changes.
* SSL: preservation of flush flag for buffered data.Valentin Bartenev2013-01-28
| | | | | Previously, if SSL buffer was not sent we lost information that the data must be flushed.
* SSL: resetting of flush flag after the data was written.Valentin Bartenev2013-01-28
| | | | | There is no need to flush next chunk of data if it does not contain a buffer with the flush or last_buf flags set.
* SSL: removed conditions that always hold true.Valentin Bartenev2013-01-28
|
* Secure_link: fixed configuration inheritance.Ruslan Ermilov2013-01-28
| | | | | | The "secure_link_secret" directive was always inherited from the outer configuration level even when "secure_link" and "secure_link_md5" were specified on the inner level.
* Events: fixed null pointer dereference with resolver and poll.Ruslan Ermilov2013-01-25
| | | | | | | A POLLERR signalled by poll() without POLLIN/POLLOUT, as seen on Linux, would generate both read and write events, but there's no write event handler for resolver events. A fix is to only call event handler of an active event.
* GeoIP: IPv6 support.Ruslan Ermilov2013-01-24
| | | | | | | When using IPv6 databases, IPv4 addresses are looked up as IPv4-mapped IPv6 addresses. Mostly based on a patch by Gregor Kališnik (ticket #250).
* Proxy: fixed proxy_method to always add space.Maxim Dounin2013-01-22
| | | | | | Before the patch if proxy_method was specified at http{} level the code to add trailing space wasn't executed, resulting in incorrect requests to upstream.
* Variables $pipe, $request_length, $time_iso8601, and $time_local.Ruslan Ermilov2013-01-21
| | | | | | Log module counterparts are preserved for efficiency. Based on patch by Kiril Kalchev.
* Version bump.Ruslan Ermilov2013-01-17
|
* Fixed and improved the "*_bind" directives of proxying modules.Ruslan Ermilov2013-01-16
| | | | | | | The "proxy_bind", "fastcgi_bind", "uwsgi_bind", "scgi_bind" and "memcached_bind" directives are now inherited; inherited value can be reset by the "off" parameter. Duplicate directives are now detected. Parameter value can now contain variables.
* Fixed "proxy_pass" with IP address and no port (ticket #276).Ruslan Ermilov2013-01-10
| | | | | | | | | Upstreams created by "proxy_pass" with IP address and no port were broken in 1.3.10, by not initializing port in u->sockaddr. API change: ngx_parse_url() was modified to always initialize port (in u->sockaddr and in u->port), even for the u->no_resolve case; ngx_http_upstream() and ngx_http_upstream_add() were adopted.
* SSL: speedup loading of configs with many ssl servers.Maxim Dounin2013-01-09
| | | | | | | | | The patch saves one EC_KEY_generate_key() call per server{} block by informing OpenSSL about SSL_OP_SINGLE_ECDH_USE we are going to use before the SSL_CTX_set_tmp_ecdh() call. For a configuration file with 10k simple server{} blocks with SSL enabled this change reduces startup time from 18s to 5s on a slow test box here.
* Events: added check for duplicate "events" directive.Valentin Bartenev2013-01-08
|
* The data pointer in ngx_open_file_t objects must be initialized.Valentin Bartenev2013-01-08
| | | | | | | Uninitialized pointer may result in arbitrary segfaults if access_log is used without buffer and without variables in file path. Patch by Tatsuhiko Kubo (ticket #268).
* Geo: improved code readability.Ruslan Ermilov2012-12-27
|
* Upstream keepalive: detect duplicate "keepalive" directive.Ruslan Ermilov2012-12-26
| | | | | A failure to detect duplicate "keepalive" directive resulted in stack exhaustion.
* Version bump.Ruslan Ermilov2012-12-26
|
* Geo: made "default" affect both IPv4 and IPv6 when using prefixes.Ruslan Ermilov2012-12-26
| | | | | | Previously, "default" was equivalent to specifying 0.0.0.0/0, now it's equivalent to specifying both 0.0.0.0/0 and ::/0 (if support for IPv6 is enabled) with the same value.
* Geo: properly initialize ngx_cidr_t when dealing with "default".Ruslan Ermilov2012-12-25
|
* Geo: IPv6 support.Ruslan Ermilov2012-12-25
| | | | The "ranges" mode is still limited to IPv4 only.
* Upstream: fixed state resetting when switching to backup servers.Valentin Bartenev2012-12-25
| | | | Based on patch by Thomas Chen (ticket #257).
* Fixed HEAD requests handling when proxying is used (closes #261).Valentin Bartenev2012-12-24
|
* Trailing whitespace fix.Ruslan Ermilov2012-12-24
|
* Access log: the "gzip" parameter of the "access_log" directive.Valentin Bartenev2012-12-23
| | | | Note: this requires zlib version 1.2.0.4 or above to work.
* Access log: the "flush" parameter of the "access_log" directive.Valentin Bartenev2012-12-23
|
* Reopening log files code moved to a separate function.Valentin Bartenev2012-12-23
| | | | | | The code refactored in a way to call custom handler that can do appropriate cleanup work (if any), like flushing buffers, finishing compress streams, finalizing connections to log daemon, etc..
* Access log: fixed redundant buffer reallocation.Valentin Bartenev2012-12-23
| | | | | Previously a new buffer was allocated for every "access_log" directive with the same file path and "buffer=" parameters, while only one buffer per file is used.
* Properly initialize "struct in6_addr" with zeroes.Ruslan Ermilov2012-12-22
|
* Core: crypt_r() error handling fixed.Maxim Dounin2012-12-21
| | | | | | | | | | | | The crypt_r() function returns NULL on errors, check it explicitly instead of assuming errno will remain 0 if there are no errors (per POSIX, the setting of errno after a successful call to a function is unspecified unless the description of that function specifies that errno shall not be modified). Additionally, dropped unneeded ngx_set_errno(0) and fixed error handling of memory allocation after normal crypt(), which was inapropriate and resulted in null pointer dereference on allocation failures.
* Image filter: fixed image_filter rotate inheritance.Maxim Dounin2012-12-21
| | | | | | | | | | | | | | | | | | Configurations like location /i/ { image_filter resize 200 200; image_filter rotate 180; location /i/foo/ { image_filter resize 200 200; } } resulted in rotation incorrectly applied in the location /i/foo, without any way to clear it. Fix is to handle conf->angle/conf->acv consistently with other filter variables and do not try to inherit them if there are transformations defined for current location.
* Geo: ensure that default entry is always present.Ruslan Ermilov2012-12-21
| | | | | If 0.0.0.0/32 entry was present and there was no explicit "default", we failed to add an empty string as a default value.
* There's no need to normalize address returned by ngx_ptocidr().Ruslan Ermilov2012-12-21
|
* Image filter: configuration inheritance fixes.Maxim Dounin2012-12-20
| | | | | | | | | | | | | | The image_filter_jpeg_quality, image_filter_sharpen and "image_filter rotate" were inherited incorrectly if a directive with variables was defined, and then redefined to a literal value, i.e. in configurations like image_filter_jpeg_quality $arg_q; location / { image_filter_jpeg_quality 50; } Patch by Ian Babrou, with minor changes.
* Brought the link to ngx_http_perl_module documentation up to date.Ruslan Ermilov2012-12-20
|
* Fixed return type of internal function that allocates radix tree nodes.Ruslan Ermilov2012-12-20
|
* Let "add_header" affect 201 responses (ticket #125).Ruslan Ermilov2012-12-19
|
* Slightly optimized code that handles special headers in "add_header".Ruslan Ermilov2012-12-19
|