]> git.kaiwu.me - nginx.git/log
nginx.git
7 years agoEvents: fixed handling zero-length client address.
Roman Arutyunyan [Fri, 1 Jun 2018 13:53:02 +0000 (16:53 +0300)]
Events: fixed handling zero-length client address.

On Linux recvmsg() syscall may return a zero-length client address when
receiving a datagram from an unbound unix datagram socket.  It is usually
assumed that socket address has at least the sa_family member.  Zero-length
socket address caused buffer over-read in functions which receive socket
address, for example ngx_sock_ntop().  Typically the over-read resulted in
unexpected socket family followed by session close.  Now a fake socket address
is allocated instead of a zero-length client address.

7 years agoRemoved glibc crypt_r() bug workaround (ticket #1469).
Maxim Dounin [Wed, 23 May 2018 13:38:16 +0000 (16:38 +0300)]
Removed glibc crypt_r() bug workaround (ticket #1469).

The bug in question was fixed in glibc 2.3.2 and is no longer expected
to manifest itself on real servers.  On the other hand, the workaround
causes compilation problems on various systems.  Previously, we've
already fixed the code to compile with musl libc (fd6fd02f6a4d), and
now it is broken on Fedora 28 where glibc's crypt library was replaced
by libxcrypt.  So the workaround was removed.

8 years agoSilenced -Wcast-function-type warnings (closes #1546).
Sergey Kandaurov [Mon, 7 May 2018 09:54:37 +0000 (09:54 +0000)]
Silenced -Wcast-function-type warnings (closes #1546).

Cast to intermediate "void *" to lose compiler knowledge about the original
type and pass the warning.  This is not a real fix but rather a workaround.

Found by gcc8.

7 years agoVersion bump.
Maxim Dounin [Mon, 3 Dec 2018 17:07:36 +0000 (20:07 +0300)]
Version bump.

7 years agorelease-1.14.1 tag
Maxim Dounin [Tue, 6 Nov 2018 13:52:46 +0000 (16:52 +0300)]
release-1.14.1 tag

7 years agonginx-1.14.1-RELEASE release-1.14.1
Maxim Dounin [Tue, 6 Nov 2018 13:52:46 +0000 (16:52 +0300)]
nginx-1.14.1-RELEASE

7 years agogRPC: limited allocations due to ping and settings frames.
Maxim Dounin [Tue, 6 Nov 2018 13:29:59 +0000 (16:29 +0300)]
gRPC: limited allocations due to ping and settings frames.

7 years agoHTTP/2: limit the number of idle state switches.
Ruslan Ermilov [Tue, 6 Nov 2018 13:29:49 +0000 (16:29 +0300)]
HTTP/2: limit the number of idle state switches.

An attack that continuously switches HTTP/2 connection between
idle and active states can result in excessive CPU usage.
This is because when a connection switches to the idle state,
all of its memory pool caches are freed.

This change limits the maximum allowed number of idle state
switches to 10 * http2_max_requests (i.e., 10000 by default).
This limits possible CPU usage in one connection, and also
imposes a limit on the maximum lifetime of a connection.

Initially reported by Gal Goldshtein from F5 Networks.

7 years agoHTTP/2: flood detection.
Ruslan Ermilov [Tue, 6 Nov 2018 13:29:35 +0000 (16:29 +0300)]
HTTP/2: flood detection.

Fixed uncontrolled memory growth in case peer is flooding us with
some frames (e.g., SETTINGS and PING) and doesn't read data.  Fix
is to limit the number of allocated control frames.

7 years agoMp4: fixed reading 64-bit atoms.
Roman Arutyunyan [Tue, 6 Nov 2018 13:29:18 +0000 (16:29 +0300)]
Mp4: fixed reading 64-bit atoms.

Previously there was no validation for the size of a 64-bit atom
in an mp4 file.  This could lead to a CPU hog when the size is 0,
or various other problems due to integer underflow when calculating
atom data size, including segmentation fault or worker process
memory disclosure.

7 years agoUpdated OpenSSL used for win32 builds.
Maxim Dounin [Tue, 28 Aug 2018 12:05:41 +0000 (15:05 +0300)]
Updated OpenSSL used for win32 builds.

7 years agoVersion bump.
Maxim Dounin [Tue, 6 Nov 2018 13:33:16 +0000 (16:33 +0300)]
Version bump.

8 years agorelease-1.14.0 tag
Maxim Dounin [Tue, 17 Apr 2018 15:22:36 +0000 (18:22 +0300)]
release-1.14.0 tag

8 years agonginx-1.14.0-RELEASE release-1.14.0
Maxim Dounin [Tue, 17 Apr 2018 15:22:35 +0000 (18:22 +0300)]
nginx-1.14.0-RELEASE

8 years agoStable branch.
Maxim Dounin [Tue, 17 Apr 2018 13:30:10 +0000 (16:30 +0300)]
Stable branch.

8 years agorelease-1.13.12 tag
Maxim Dounin [Tue, 10 Apr 2018 14:11:10 +0000 (17:11 +0300)]
release-1.13.12 tag

8 years agonginx-1.13.12-RELEASE release-1.13.12
Maxim Dounin [Tue, 10 Apr 2018 14:11:09 +0000 (17:11 +0300)]
nginx-1.13.12-RELEASE

8 years agoUpstream: fixed u->conf->preserve_output (ticket #1519).
Maxim Dounin [Thu, 5 Apr 2018 13:56:12 +0000 (16:56 +0300)]
Upstream: fixed u->conf->preserve_output (ticket #1519).

Previously, ngx_http_upstream_process_header() might be called after
we've finished reading response headers and switched to a different read
event handler, leading to errors with gRPC proxying.  Additionally,
the u->conf->read_timeout timer might be re-armed during reading response
headers (while this is expected to be a single timeout on reading
the whole response header).

8 years agoVersion bump.
Maxim Dounin [Thu, 5 Apr 2018 13:53:27 +0000 (16:53 +0300)]
Version bump.

8 years agorelease-1.13.11 tag
Maxim Dounin [Tue, 3 Apr 2018 14:38:10 +0000 (17:38 +0300)]
release-1.13.11 tag

8 years agonginx-1.13.11-RELEASE release-1.13.11
Maxim Dounin [Tue, 3 Apr 2018 14:38:09 +0000 (17:38 +0300)]
nginx-1.13.11-RELEASE

8 years agoUpdated OpenSSL and PCRE used for win32 builds.
Maxim Dounin [Tue, 3 Apr 2018 00:54:09 +0000 (03:54 +0300)]
Updated OpenSSL and PCRE used for win32 builds.

8 years agoUpstream: fixed ngx_http_upstream_test_next() conditions.
Maxim Dounin [Mon, 2 Apr 2018 23:43:18 +0000 (02:43 +0300)]
Upstream: fixed ngx_http_upstream_test_next() conditions.

Previously, ngx_http_upstream_test_next() used an outdated condition on
whether it will be possible to switch to a different server or not.  It
did not take into account restrictions on non-idempotent requests, requests
with non-buffered request body, and the next upstream timeout.

For such requests, switching to the next upstream server was rejected
later in ngx_http_upstream_next(), resulting in nginx own error page
being returned instead of the original upstream response.

8 years agoCore: fixed build, broken by 63e91f263a49.
Vladimir Homutov [Mon, 2 Apr 2018 17:38:43 +0000 (20:38 +0300)]
Core: fixed build, broken by 63e91f263a49.

Both Solaris and Windows define "s_addr" as a macro.

8 years agoCore: revised the PROXY protocol v2 code.
Ruslan Ermilov [Mon, 2 Apr 2018 15:40:04 +0000 (18:40 +0300)]
Core: revised the PROXY protocol v2 code.

- use normal prefixes for types and macros
- removed some macros and types
- revised debug messages
- removed useless check of ngx_sock_ntop() returning 0
- removed special processing of AF_UNSPEC

8 years agoCore: style.
Vladimir Homutov [Tue, 27 Mar 2018 15:39:38 +0000 (18:39 +0300)]
Core: style.

8 years agoCore: added processing of version 2 of the PROXY protocol.
Vladimir Homutov [Thu, 22 Mar 2018 12:55:28 +0000 (15:55 +0300)]
Core: added processing of version 2 of the PROXY protocol.

The protocol used on inbound connection is auto-detected and corresponding
parser is used to extract passed addresses.  TLV parameters are ignored.

The maximum supported size of PROXY protocol header is 107 bytes
(similar to version 1).

8 years agoStream: set action before each recv/send while proxying.
Roman Arutyunyan [Thu, 22 Mar 2018 15:43:49 +0000 (18:43 +0300)]
Stream: set action before each recv/send while proxying.

Now it's clear from log error message if the error occurred on client or
upstream side.

8 years agogRPC: fixed possible sign extension of error and setting_value.
Maxim Dounin [Thu, 22 Mar 2018 16:26:25 +0000 (19:26 +0300)]
gRPC: fixed possible sign extension of error and setting_value.

All cases are harmless and should not happen on valid values, though can
result in bad values being shown incorrectly in logs.

Found by Coverity (CID 143031114303121430313).

8 years agoImproved code readability (closes #1512).
Ruslan Ermilov [Thu, 22 Mar 2018 15:13:33 +0000 (18:13 +0300)]
Improved code readability (closes #1512).

8 years agoConfigure: restored "no-threads" in OpenSSL builds.
Maxim Dounin [Thu, 22 Mar 2018 12:56:07 +0000 (15:56 +0300)]
Configure: restored "no-threads" in OpenSSL builds.

This was previously used, but was incorrectly removed in 83d54192e97b
while removing old threads remnants.  Instead of using it conditionally
when threads are not used, we now set in unconditionally, as even with
thread pools enabled we never call OpenSSL functions in threads.

This fixes resulting binary when using --with-openssl with OpenSSL 1.1.0+
and without -lpthread linked (notably on FreeBSD without PCRE).

8 years agoConfigure: fixed static compilation with OpenSSL 1.1.1.
Maxim Dounin [Thu, 22 Mar 2018 12:55:57 +0000 (15:55 +0300)]
Configure: fixed static compilation with OpenSSL 1.1.1.

OpenSSL now uses pthread_atfork(), and this requires -lpthread on Linux
to compile.  Introduced NGX_LIBPTHREAD to add it as appropriate, similar
to existing NGX_LIBDL.

8 years agoVersion bump.
Maxim Dounin [Thu, 22 Mar 2018 12:55:52 +0000 (15:55 +0300)]
Version bump.

8 years agorelease-1.13.10 tag
Maxim Dounin [Tue, 20 Mar 2018 15:58:30 +0000 (18:58 +0300)]
release-1.13.10 tag

8 years agonginx-1.13.10-RELEASE release-1.13.10
Maxim Dounin [Tue, 20 Mar 2018 15:58:30 +0000 (18:58 +0300)]
nginx-1.13.10-RELEASE

8 years agogRPC: fixed missing state save in frame header parsing.
Sergey Kandaurov [Tue, 20 Mar 2018 12:58:11 +0000 (15:58 +0300)]
gRPC: fixed missing state save in frame header parsing.

Previously, frame state wasn't saved if HEADERS frame payload
that begins with header fragment was not received at once.

8 years agoHTTP/2: improved frame info debugging.
Ruslan Ermilov [Mon, 19 Mar 2018 18:32:15 +0000 (21:32 +0300)]
HTTP/2: improved frame info debugging.

8 years agogRPC: fixed parsing response headers split on CONTINUATION frames.
Sergey Kandaurov [Mon, 19 Mar 2018 13:42:56 +0000 (16:42 +0300)]
gRPC: fixed parsing response headers split on CONTINUATION frames.

8 years agoFixed checking ngx_tcp_push() and ngx_tcp_nopush() return values.
Ruslan Ermilov [Mon, 19 Mar 2018 13:28:23 +0000 (16:28 +0300)]
Fixed checking ngx_tcp_push() and ngx_tcp_nopush() return values.

No functional changes.

8 years agoUpstream: fixed comments after 13f8dec720b5.
Ruslan Ermilov [Mon, 19 Mar 2018 13:22:09 +0000 (16:22 +0300)]
Upstream: fixed comments after 13f8dec720b5.

The fields "uri", "location", and "url" from ngx_http_upstream_conf_t
moved to ngx_http_proxy_loc_conf_t and ngx_http_proxy_vars_t, reflect
this change in create_loc_conf comments.

8 years agoConfigure: added gRPC module help message.
Sergey Kandaurov [Mon, 19 Mar 2018 09:41:36 +0000 (12:41 +0300)]
Configure: added gRPC module help message.

8 years agoContrib: vim syntax, update core and 3rd party module directives.
Gena Makhomed [Sun, 18 Mar 2018 09:11:14 +0000 (11:11 +0200)]
Contrib: vim syntax, update core and 3rd party module directives.

8 years agogRPC: special handling of "trailer only" responses.
Maxim Dounin [Sat, 17 Mar 2018 20:04:26 +0000 (23:04 +0300)]
gRPC: special handling of "trailer only" responses.

The gRPC protocol makes a distinction between HEADERS frame with
the END_STREAM flag set, and a HEADERS frame followed by an empty
DATA frame with the END_STREAM flag.  The latter is not permitted,
and results in errors not being propagated through nginx.  Instead,
gRPC clients complain that "server closed the stream without sending
trailers" (seen in grpc-go) or "13: Received RST_STREAM with error
code 2" (seen in grpc-c).

To fix this, nginx now returns HEADERS with the END_STREAM flag if
the response length is known to be 0, and we are not expecting
any trailer headers to be added.  And the response length is
explicitly set to 0 in the gRPC proxy if we see initial HEADERS frame
with the END_STREAM flag set.

8 years agogRPC: special handling of the TE request header.
Maxim Dounin [Sat, 17 Mar 2018 20:04:25 +0000 (23:04 +0300)]
gRPC: special handling of the TE request header.

According to the gRPC protocol specification, the "TE" header is used
to detect incompatible proxies, and at least grpc-c server rejects
requests without "TE: trailers".

To preserve the logic, we have to pass "TE: trailers" to the backend if
and only if the original request contains "trailers" in the "TE" header.
Note that no other TE values are allowed in HTTP/2, so we have to remove
anything else.

8 years agoThe gRPC proxy module.
Maxim Dounin [Sat, 17 Mar 2018 20:04:24 +0000 (23:04 +0300)]
The gRPC proxy module.

The module allows passing requests to upstream gRPC servers.
The module is built by default as long as HTTP/2 support is compiled in.
Example configuration:

    grpc_pass 127.0.0.1:9000;

Alternatively, the "grpc://" scheme can be used:

    grpc_pass grpc://127.0.0.1:9000;

Keepalive support is available via the upstream keepalive module.  Note
that keepalive connections won't currently work with grpc-go as it fails
to handle SETTINGS_HEADER_TABLE_SIZE.

To use with SSL:

    grpc_pass grpcs://127.0.0.1:9000;

SSL connections use ALPN "h2" when available.  At least grpc-go works fine
without ALPN, so if ALPN is not available we just establish a connection
without it.

Tested with grpc-c++ and grpc-go.

8 years agoUpstream: u->conf->preserve_output flag.
Maxim Dounin [Sat, 17 Mar 2018 20:04:23 +0000 (23:04 +0300)]
Upstream: u->conf->preserve_output flag.

The flag can be used to continue sending request body even after we've
got a response from the backend.  In particular, this is needed for gRPC
proxying of bidirectional streaming RPCs, and also to send control frames
in other forms of RPCs.

8 years agoUpstream: u->request_body_blocked flag.
Maxim Dounin [Sat, 17 Mar 2018 20:04:22 +0000 (23:04 +0300)]
Upstream: u->request_body_blocked flag.

The flag indicates whether last ngx_output_chain() returned NGX_AGAIN
or not.  If the flag is set, we arm the u->conf->send_timeout timer.
The flag complements c->write->ready test, and allows to stop sending
the request body in an output filter due to protocol-specific flow
control.

8 years agoUpstream: trailers support, u->conf->pass_trailers flag.
Maxim Dounin [Sat, 17 Mar 2018 20:04:21 +0000 (23:04 +0300)]
Upstream: trailers support, u->conf->pass_trailers flag.

Basic trailer headers support allows one to access response trailers
via the $upstream_trailer_* variables.

Additionally, the u->conf->pass_trailers flag was introduced.  When the
flag is set, trailer headers from the upstream response are passed to
the client.  Like normal headers, trailer headers will be hidden
if present in u->conf->hide_headers_hash.

8 years agoHTTP/2: externalized various constants and interfaces.
Maxim Dounin [Sat, 17 Mar 2018 20:04:20 +0000 (23:04 +0300)]
HTTP/2: externalized various constants and interfaces.

8 years agoStyle.
Roman Arutyunyan [Mon, 12 Mar 2018 15:38:53 +0000 (18:38 +0300)]
Style.

8 years agoStream ssl_preread: $ssl_preread_alpn_protocols variable.
Roman Arutyunyan [Mon, 12 Mar 2018 13:03:08 +0000 (16:03 +0300)]
Stream ssl_preread: $ssl_preread_alpn_protocols variable.

The variable keeps a comma-separated list of protocol names from ALPN TLS
extension defined by RFC 7301.

8 years agoImproved code readablity.
Ruslan Ermilov [Wed, 7 Mar 2018 15:28:12 +0000 (18:28 +0300)]
Improved code readablity.

No functional changes.

8 years agoHTTP/2: unknown frames now logged at info level.
Maxim Dounin [Mon, 5 Mar 2018 18:35:13 +0000 (21:35 +0300)]
HTTP/2: unknown frames now logged at info level.

8 years agoStyle.
Maxim Dounin [Mon, 5 Mar 2018 18:35:08 +0000 (21:35 +0300)]
Style.

8 years agoAccess log: support for disabling escaping (ticket #1450).
Vladimir Homutov [Thu, 1 Mar 2018 08:42:55 +0000 (11:42 +0300)]
Access log: support for disabling escaping (ticket #1450).

Based on patches by Johannes Baiter <johannes.baiter@bsb-muenchen.de>
and Calin Don.

8 years agoCore: ngx_current_msec now uses monotonic time if available.
Maxim Dounin [Thu, 1 Mar 2018 17:25:50 +0000 (20:25 +0300)]
Core: ngx_current_msec now uses monotonic time if available.

When clock_gettime(CLOCK_MONOTONIC) (or faster variants, _FAST on FreeBSD,
and _COARSE on Linux) is available, we now use it for ngx_current_msec.
This should improve handling of timers if system time changes (ticket #189).

8 years agoPostpone filter: prevented uninitialized r->out.
Roman Arutyunyan [Thu, 1 Mar 2018 15:38:39 +0000 (18:38 +0300)]
Postpone filter: prevented uninitialized r->out.

The r->out chain link could be left uninitialized in case of error.
A segfault could happen if the subrequest handler accessed it.
The issue was introduced in commit 20f139e9ffa8.

8 years agoGeneric subrequests in memory.
Roman Arutyunyan [Wed, 28 Feb 2018 13:56:58 +0000 (16:56 +0300)]
Generic subrequests in memory.

Previously, only the upstream response body could be accessed with the
NGX_HTTP_SUBREQUEST_IN_MEMORY feature.  Now any response body from a subrequest
can be saved in a memory buffer.  It is available as a single buffer in r->out
and the buffer size is configured by the subrequest_output_buffer_size
directive.

Upstream, proxy and fastcgi code used to handle the old-style feature is
removed.

8 years agoModules compatibility: additional upstream metrics.
Vladimir Homutov [Thu, 22 Feb 2018 14:25:43 +0000 (17:25 +0300)]
Modules compatibility: additional upstream metrics.

8 years agoAuth basic: prevent null character in error log (ticket #1494).
Vadim Filimonov [Mon, 26 Feb 2018 14:52:20 +0000 (16:52 +0200)]
Auth basic: prevent null character in error log (ticket #1494).

8 years agoGenerate error for unsupported IPv6 transparent proxy.
Roman Arutyunyan [Thu, 22 Feb 2018 10:16:21 +0000 (13:16 +0300)]
Generate error for unsupported IPv6 transparent proxy.

On some platforms (for example, Linux with glibc 2.12-2.25) IPv4 transparent
proxying is available, but IPv6 transparent proxying is not.  The entire feature
is enabled in this case and NGX_HAVE_TRANSPARENT_PROXY macro is set to 1.
Previously, an attempt to enable transparency for an IPv6 socket was silently
ignored in this case and was usually followed by a bind(2) EADDRNOTAVAIL error
(ticket #1487).  Now the error is generated for unavailable IPv6 transparent
proxy.

8 years agoHTTP/2: style.
Ruslan Ermilov [Thu, 22 Feb 2018 09:42:29 +0000 (12:42 +0300)]
HTTP/2: style.

Unified the style of validity checks in ngx_http_v2_validate_header().

8 years agoGeo: fixed indentation.
Sergey Kandaurov [Wed, 21 Feb 2018 14:26:00 +0000 (17:26 +0300)]
Geo: fixed indentation.

8 years agoGeo: optimized configuration parser.
Ruslan Ermilov [Wed, 21 Feb 2018 12:50:43 +0000 (15:50 +0300)]
Geo: optimized configuration parser.

If the geo block parser has failed, doing more things is pointless.

8 years agoGeo: fixed memory allocation error handling (closes #1482).
Ruslan Ermilov [Wed, 21 Feb 2018 12:50:42 +0000 (15:50 +0300)]
Geo: fixed memory allocation error handling (closes #1482).

If during configuration parsing of the geo directive the memory
allocation has failed, pool used to parse configuration inside
the block, and sometimes the temporary pool were not destroyed.

8 years agoVersion bump.
Ruslan Ermilov [Wed, 21 Feb 2018 12:50:35 +0000 (15:50 +0300)]
Version bump.

8 years agorelease-1.13.9 tag
Maxim Dounin [Tue, 20 Feb 2018 14:08:49 +0000 (17:08 +0300)]
release-1.13.9 tag

8 years agonginx-1.13.9-RELEASE release-1.13.9
Maxim Dounin [Tue, 20 Feb 2018 14:08:48 +0000 (17:08 +0300)]
nginx-1.13.9-RELEASE

8 years agoHTTP/2: precalculate hash for "Cookie".
Maxim Dounin [Thu, 15 Feb 2018 16:06:22 +0000 (19:06 +0300)]
HTTP/2: precalculate hash for "Cookie".

There is no need to calculate hashes of static strings at runtime.  The
ngx_hash() macro can be used to do it during compilation instead, similarly
to how it is done in ngx_http_proxy_module.c for "Server" and "Date" headers.

8 years agoHTTP/2: fixed ngx_http_v2_push_stream() allocation error handling.
Ruslan Ermilov [Thu, 15 Feb 2018 14:51:37 +0000 (17:51 +0300)]
HTTP/2: fixed ngx_http_v2_push_stream() allocation error handling.

In particular, if a stream object allocation failed, and a client sent
the PRIORITY frame for this stream, ngx_http_v2_set_dependency() could
dereference a null pointer while trying to re-parent a dependency node.

8 years agoHTTP/2: push additional request headers (closes #1478).
Ruslan Ermilov [Thu, 15 Feb 2018 14:51:32 +0000 (17:51 +0300)]
HTTP/2: push additional request headers (closes #1478).

The Accept-Encoding, Accept-Language, and User-Agent header fields
are now copied from the original request to pushed requests.

8 years agoExpose more headers with NGX_HTTP_HEADERS.
Ruslan Ermilov [Thu, 15 Feb 2018 14:51:26 +0000 (17:51 +0300)]
Expose more headers with NGX_HTTP_HEADERS.

8 years agoCore: added a stub for additional zone configuration.
Vladimir Homutov [Thu, 15 Feb 2018 13:08:05 +0000 (16:08 +0300)]
Core: added a stub for additional zone configuration.

8 years agoHTTP/2: style.
Sergey Kandaurov [Wed, 14 Feb 2018 23:34:16 +0000 (02:34 +0300)]
HTTP/2: style.

8 years agoHTTP/2: fixed null pointer dereference with server push.
Ruslan Ermilov [Fri, 9 Feb 2018 20:20:08 +0000 (23:20 +0300)]
HTTP/2: fixed null pointer dereference with server push.

r->headers_in.host can be NULL in ngx_http_v2_push_resource().

This happens when a request is terminated with 400 before the :authority
or Host header is parsed, and either pushing is enabled on the server{}
level or error_page 400 redirects to a location with pushes configured.

Found by Coverity (CID 1429156).

8 years agoHTTP/2: fixed build with -Werror=unused-but-set-variable.
Ruslan Ermilov [Thu, 8 Feb 2018 09:11:30 +0000 (12:11 +0300)]
HTTP/2: fixed build with -Werror=unused-but-set-variable.

8 years agoHTTP/2: server push.
Ruslan Ermilov [Thu, 8 Feb 2018 06:55:03 +0000 (09:55 +0300)]
HTTP/2: server push.

Resources to be pushed are configured with the "http2_push" directive.

Also, preload links from the Link response headers, as described in
https://www.w3.org/TR/preload/#server-push-http-2, can be pushed, if
enabled with the "http2_push_preload" directive.

Only relative URIs with absolute paths can be pushed.

The number of concurrent pushes is normally limited by a client, but
cannot exceed a hard limit set by the "http2_max_concurrent_pushes"
directive.

8 years agoHTTP/2: changed prototypes of request pseudo-headers parsers.
Ruslan Ermilov [Thu, 8 Feb 2018 06:54:49 +0000 (09:54 +0300)]
HTTP/2: changed prototypes of request pseudo-headers parsers.

No functional changes.

8 years agoBasic support of the Link response header.
Ruslan Ermilov [Thu, 8 Feb 2018 06:54:18 +0000 (09:54 +0300)]
Basic support of the Link response header.

8 years agoDav: added error logging.
Roman Arutyunyan [Wed, 7 Feb 2018 13:44:29 +0000 (16:44 +0300)]
Dav: added error logging.

Previously, when request body was not available or was previously read in
memory rather than a file, client received HTTP 500 error, but no explanation
was logged in error log.  This could happen, for example, if request body was
read or discarded prior to error_page redirect, or if mirroring was enabled
along with dav.

8 years agoHTTP/2: removed unused field from ngx_http_v2_stream_t.
Sergey Kandaurov [Tue, 6 Feb 2018 17:02:59 +0000 (20:02 +0300)]
HTTP/2: removed unused field from ngx_http_v2_stream_t.

8 years agoContrib: vim syntax, update 3rd party module directives.
Gena Makhomed [Thu, 1 Feb 2018 09:15:14 +0000 (11:15 +0200)]
Contrib: vim syntax, update 3rd party module directives.

Add new directives for 3rd party modules.

8 years agoContrib: vim syntax, update core module directives.
Gena Makhomed [Thu, 1 Feb 2018 09:09:35 +0000 (11:09 +0200)]
Contrib: vim syntax, update core module directives.

"match" is block directive, "upstream_conf" is deprecated
by patch http://hg.nginx.org/nginx.org/rev/27c53e1cb4b6

8 years agoUpstream: removed X-Powered-By from the list of special headers.
Ruslan Ermilov [Tue, 30 Jan 2018 19:23:58 +0000 (22:23 +0300)]
Upstream: removed X-Powered-By from the list of special headers.

After 1e720b0be7ec, it's neither specially processed nor copied
when redirecting with X-Accel-Redirect.

8 years agoSSL: using default server context in session remove (closes #1464).
Sergey Kandaurov [Tue, 30 Jan 2018 14:46:31 +0000 (17:46 +0300)]
SSL: using default server context in session remove (closes #1464).

This fixes segfault in configurations with multiple virtual servers sharing
the same port, where a non-default virtual server block misses certificate.

8 years agoHTTP/2: finalize request as bad if parsing of pseudo-headers fails.
Ruslan Ermilov [Tue, 30 Jan 2018 11:44:31 +0000 (14:44 +0300)]
HTTP/2: finalize request as bad if parsing of pseudo-headers fails.

This is in line when the required pseudo-headers are missing, and
avoids spurious zero statuses in access.log.

8 years agoHTTP/2: more style, comments, and debugging.
Ruslan Ermilov [Mon, 29 Jan 2018 13:06:33 +0000 (16:06 +0300)]
HTTP/2: more style, comments, and debugging.

8 years agoHTTP/2: handle duplicate INITIAL_WINDOW_SIZE settings.
Ruslan Ermilov [Mon, 29 Jan 2018 12:54:36 +0000 (15:54 +0300)]
HTTP/2: handle duplicate INITIAL_WINDOW_SIZE settings.

8 years agoFixed --test-build-eventport on macOS 10.12 and later.
Ruslan Ermilov [Tue, 16 Jan 2018 10:52:03 +0000 (13:52 +0300)]
Fixed --test-build-eventport on macOS 10.12 and later.

In macOS 10.12, CLOCK_REALTIME and clockid_t were added, but not timer_t.

8 years agoUpstream: fixed "header already sent" alerts on backend errors.
Maxim Dounin [Thu, 11 Jan 2018 18:43:49 +0000 (21:43 +0300)]
Upstream: fixed "header already sent" alerts on backend errors.

Following ad3f342f14ba046c (1.9.13), it is possible that a request where
header was already sent will be finalized with NGX_HTTP_BAD_GATEWAY,
triggering an attempt to return additional error response and the
"header already sent" alert as a result.

In particular, it is trivial to reproduce the problem with a HEAD request
and caching enabled.  With caching enabled nginx will change HEAD to GET
and will set u->pipe->downstream_error to suppress sending the response
body to the client.  When a backend-related error occurs (for example,
proxy_read_timeout expires), ngx_http_finalize_upstream_request() will
be called with NGX_HTTP_BAD_GATEWAY.  After ad3f342f14ba046c this will
result in ngx_http_finalize_request(NGX_HTTP_BAD_GATEWAY).

Fix is to move u->pipe->downstream_error handling to a later point,
where all special response codes are changed to NGX_ERROR.

Reported by Jan Prachar,
http://mailman.nginx.org/pipermail/nginx-devel/2018-January/010737.html.

8 years agoYear 2018.
Maxim Dounin [Thu, 11 Jan 2018 18:43:24 +0000 (21:43 +0300)]
Year 2018.

8 years agoContrib: vim syntax, update core module directives.
Gena Makhomed [Thu, 28 Dec 2017 10:01:05 +0000 (12:01 +0200)]
Contrib: vim syntax, update core module directives.

Removed non-existent directives and directive redefinitions.

8 years agoContrib: vim syntax, update 3rd party module directives.
Gena Makhomed [Thu, 28 Dec 2017 09:49:44 +0000 (11:49 +0200)]
Contrib: vim syntax, update 3rd party module directives.

3rd party modules list synchronized with FreeBSD nginx-devel port.

8 years agoVersion bump.
Maxim Dounin [Fri, 29 Dec 2017 21:15:07 +0000 (00:15 +0300)]
Version bump.

8 years agorelease-1.13.8 tag
Maxim Dounin [Tue, 26 Dec 2017 16:01:12 +0000 (19:01 +0300)]
release-1.13.8 tag

8 years agonginx-1.13.8-RELEASE release-1.13.8
Maxim Dounin [Tue, 26 Dec 2017 16:01:11 +0000 (19:01 +0300)]
nginx-1.13.8-RELEASE

8 years agoUpdated OpenSSL used for win32 builds.
Maxim Dounin [Tue, 26 Dec 2017 14:48:49 +0000 (17:48 +0300)]
Updated OpenSSL used for win32 builds.

8 years agoContrib: vim syntax, listen options.
Gena Makhomed [Mon, 25 Dec 2017 16:30:01 +0000 (18:30 +0200)]
Contrib: vim syntax, listen options.

8 years agoContrib: vim syntax, update core module directives.
Gena Makhomed [Mon, 25 Dec 2017 15:57:01 +0000 (17:57 +0200)]
Contrib: vim syntax, update core module directives.

8 years agoContrib: updated vim syntax rules for variables.
Maxim Dounin [Mon, 25 Dec 2017 16:41:00 +0000 (19:41 +0300)]
Contrib: updated vim syntax rules for variables.

Non-quoted parameters are allowed to contain variables in curly brackets
(see d91a8c4ac6bb), so vim syntax rules were adjusted accordingly.