]> git.kaiwu.me - nginx.git/log
nginx.git
12 years agonginx-1.5.10-RELEASE release-1.5.10
Maxim Dounin [Tue, 4 Feb 2014 12:26:46 +0000 (16:26 +0400)]
nginx-1.5.10-RELEASE

12 years agoSPDY: fixed parsing of the priority field.
Shigeki Ohtsu [Tue, 4 Feb 2014 05:06:23 +0000 (14:06 +0900)]
SPDY: fixed parsing of the priority field.

The size of the priority field is increased by one bit in spdy/3,
and now it's a 3-bit field followed by 5 bits of unused space.
But a shift of these bits hasn't been adjusted in 39d7eef2e332
accordingly.

12 years agoUpdated PCRE used for win32 builds.
Maxim Dounin [Tue, 4 Feb 2014 03:45:33 +0000 (07:45 +0400)]
Updated PCRE used for win32 builds.

12 years agoCore: added ngx_encode_base64url().
Maxim Dounin [Tue, 4 Feb 2014 00:59:21 +0000 (04:59 +0400)]
Core: added ngx_encode_base64url().

12 years agoCore: handle getsockopt(TCP_FASTOPEN) failures.
Piotr Sikora [Thu, 30 Jan 2014 22:58:21 +0000 (14:58 -0800)]
Core: handle getsockopt(TCP_FASTOPEN) failures.

Linux returns EOPNOTSUPP for non-TCP sockets and ENOPROTOOPT for TCP
sockets, because getsockopt(TCP_FASTOPEN) is not implemented so far.

While there, lower the log level from ALERT to NOTICE to match other
getsockopt() failures.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
12 years agoSPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev [Fri, 31 Jan 2014 15:17:26 +0000 (19:17 +0400)]
SPDY: protocol implementation switched to spdy/3.1.

12 years agoFixed false compiler warning.
Vladimir Homutov [Fri, 31 Jan 2014 10:18:52 +0000 (14:18 +0400)]
Fixed false compiler warning.

Newer gcc versions (4.7+) report possible use of uninitialized variable if
nginx is being compiled with -O3.

12 years agoFixed a compile warning introduced by 01e2a5bcdd8f.
Ruslan Ermilov [Thu, 30 Jan 2014 15:13:12 +0000 (19:13 +0400)]
Fixed a compile warning introduced by 01e2a5bcdd8f.

On systems with OpenSSL that has NPN support but lacks
ALPN support, some compilers emitted a warning about
possibly uninitialized "data" variable.

12 years agoProxy: fixed upstream search by proxy_pass with variables.
Ruslan Ermilov [Thu, 30 Jan 2014 14:57:11 +0000 (18:57 +0400)]
Proxy: fixed upstream search by proxy_pass with variables.

If "proxy_pass" is specified with variables, the resulting
hostname is looked up in the list of upstreams defined in
configuration.  The search was case-sensitive, as opposed
to the case of "proxy_pass" specified without variables.

12 years agoSSL: support ALPN (IETF's successor to NPN).
Piotr Sikora [Tue, 28 Jan 2014 23:33:49 +0000 (15:33 -0800)]
SSL: support ALPN (IETF's successor to NPN).

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
12 years agoMp4: fix seeks to standalone last chunk.
Roman Arutyunyan [Wed, 29 Jan 2014 09:44:15 +0000 (13:44 +0400)]
Mp4: fix seeks to standalone last chunk.

If seek position is within the last track chunk
and that chunk is standalone (stsc entry describes only
this chunk) such seek generates stsc seek error. The
problem is that chunk numbers start with 1, not with 0.

12 years agoMp4: skip tracks shorter than seek position (ticket #414).
Roman Arutyunyan [Wed, 29 Jan 2014 09:33:45 +0000 (13:33 +0400)]
Mp4: skip tracks shorter than seek position (ticket #414).

Mp4 module does not check movie and track durations when reading
file.  Instead it generates errors when track metadata is shorter
than seek position.  Now such tracks are skipped and movie duration
check is performed at file read stage.

12 years agoMp4: fix seeks after the last key frame.
Roman Arutyunyan [Wed, 29 Jan 2014 09:30:36 +0000 (13:30 +0400)]
Mp4: fix seeks after the last key frame.

Mp4 module does not allow seeks after the last key frame.  Since
stss atom only contains key frames it's usually shorter than
other track atoms.  That leads to stss seek error when seek
position is close to the end of file.  The fix outputs empty
stss frame instead of generating error.

12 years agoFixed TCP_DEFER_ACCEPT handling (ticket #353).
Maxim Dounin [Tue, 28 Jan 2014 11:40:46 +0000 (15:40 +0400)]
Fixed TCP_DEFER_ACCEPT handling (ticket #353).

Backed out 05a56ebb084a, as it turns out that kernel can return connections
without any delay if syncookies are used.  This basically means we can't
assume anything about connections returned with deferred accept set.

To solve original problem the 05a56ebb084a tried to solve, i.e. to don't
wait longer than needed if a connection was accepted after deferred accept
timeout, this patch changes a timeout set with setsockopt(TCP_DEFER_ACCEPT)
to 1 second, unconditionally.  This is believed to be enough for speed
improvements, and doesn't imply major changes to timeouts used.

Note that before 2.6.32 connections were dropped after a timeout.  Though
it is believed that 1s is still appropriate for kernels before 2.6.32,
as previously tcp_synack_retries controlled the actual timeout and 1s results
in more than 1 minute actual timeout by default.

12 years agoSSI: fixed $date_local and $date_gmt without SSI (ticket #230).
Maxim Dounin [Tue, 28 Jan 2014 11:40:45 +0000 (15:40 +0400)]
SSI: fixed $date_local and $date_gmt without SSI (ticket #230).

If there is no SSI context in a given request at a given time,
the $date_local and $date_gmt variables used "%s" format, instead
of "%A, %d-%b-%Y %H:%M:%S %Z" documented as the default and used
if there is SSI module context and timefmt wasn't modified using
the "config" SSI command.

While use of these variables outside of the SSI evaluation isn't strictly
valid, previous behaviour is certainly inconsistent, hence the fix.

12 years agoConfigure: enabled -Werror for clang.
Ruslan Ermilov [Mon, 27 Jan 2014 20:31:31 +0000 (00:31 +0400)]
Configure: enabled -Werror for clang.

Modern clang versions seem to no longer produce warnings for
system headers on Linux (at least clang 3.3 works), hence the
change.  For older versions --with-cc-opt="-Wno-error" can be
used as a workaround.

12 years agoTypo fixed.
Tatsuhiko Kubo [Thu, 23 Jan 2014 13:09:59 +0000 (22:09 +0900)]
Typo fixed.

12 years agoSSL: fixed $ssl_session_id possible segfault after 97e3769637a7.
Maxim Dounin [Thu, 23 Jan 2014 14:32:26 +0000 (18:32 +0400)]
SSL: fixed $ssl_session_id possible segfault after 97e3769637a7.

Even during execution of a request it is possible that there will be
no session available, notably in case of renegotiation.  As a result
logging of $ssl_session_id in some cases caused NULL pointer dereference
after revision 97e3769637a7 (1.5.9).  The check added returns an empty
string if there is no session available.

12 years agoVersion bump.
Maxim Dounin [Thu, 23 Jan 2014 14:32:25 +0000 (18:32 +0400)]
Version bump.

12 years agorelease-1.5.9 tag
Maxim Dounin [Wed, 22 Jan 2014 13:42:59 +0000 (17:42 +0400)]
release-1.5.9 tag

12 years agonginx-1.5.9-RELEASE release-1.5.9
Maxim Dounin [Wed, 22 Jan 2014 13:42:59 +0000 (17:42 +0400)]
nginx-1.5.9-RELEASE

12 years agoUpdated OpenSSL used for win32 builds.
Maxim Dounin [Wed, 22 Jan 2014 12:10:13 +0000 (16:10 +0400)]
Updated OpenSSL used for win32 builds.

12 years agoUpstream: reading from a client after connection upgrade.
Maxim Dounin [Wed, 22 Jan 2014 12:05:07 +0000 (16:05 +0400)]
Upstream: reading from a client after connection upgrade.

Read event on a client connection might have been disabled during
previous processing, and we at least need to handle events.  Calling
ngx_http_upstream_process_upgraded() is a simpliest way to do it.

Notably this change is needed for select, poll and /dev/poll event
methods.

Previous version of this patch was posted here:
http://mailman.nginx.org/pipermail/nginx/2014-January/041839.html

12 years agoSSL: fixed $ssl_session_id variable.
Maxim Dounin [Wed, 22 Jan 2014 12:05:06 +0000 (16:05 +0400)]
SSL: fixed $ssl_session_id variable.

Previously, it used to contain full session serialized instead of just
a session id, making it almost impossible to use the variable in a safe
way.

Thanks to Ivan Ristić.

12 years agoSPDY: use ngx_queue_t to queue streams for post processing.
Valentin Bartenev [Mon, 20 Jan 2014 16:56:49 +0000 (20:56 +0400)]
SPDY: use ngx_queue_t to queue streams for post processing.

It simplifies the code and allows easy reuse the same queue pointer to store
streams in various queues with different requirements.  Future implementation
of SPDY/3.1 will take advantage of this quality.

12 years agoSPDY: store the length of frame instead of its whole size.
Valentin Bartenev [Wed, 22 Jan 2014 00:58:19 +0000 (04:58 +0400)]
SPDY: store the length of frame instead of its whole size.

The "length" value better corresponds with the specification and reduces
confusion about whether frame's header is included in "size" or not.

Also this change simplifies some parts of code, since in more cases the
length of frame is more useful than its actual size, especially considering
that the size of frame header is constant.

12 years agoSPDY: use frame->next pointer to chain free frames.
Valentin Bartenev [Wed, 22 Jan 2014 00:58:19 +0000 (04:58 +0400)]
SPDY: use frame->next pointer to chain free frames.

There is no need in separate "free" pointer and like it is for ngx_chain_t
the "next" pointer can be used.  But after this change successfully handled
frame should not be accessed, so the frame handling cycle was improved to
store pointer to the next frame before processing.

Also worth noting that initializing "free" pointer to NULL in the original
code was surplus.

12 years agoSPDY: proper handling of all RST_STREAM statuses.
Valentin Bartenev [Wed, 22 Jan 2014 00:58:19 +0000 (04:58 +0400)]
SPDY: proper handling of all RST_STREAM statuses.

Previously, only stream CANCEL and INTERNAL_ERROR were handled right.

12 years agoSPDY: removed state to check first SETTINGS frame.
Valentin Bartenev [Wed, 22 Jan 2014 00:58:19 +0000 (04:58 +0400)]
SPDY: removed state to check first SETTINGS frame.

That code was based on misunderstanding of spdy specification about
configuration applicability in the SETTINGS frames.  The original
interpretation was that configuration is assigned for the whole
SPDY connection, while it is only for the endpoint.

Moreover, the strange thing is that specification forbids multiple
entries in the SETTINGS frame with the same ID even if flags are
different.  As a result, Chrome sends two SETTINGS frames: one with
its own configuration, and another one with configuration stored
for a server (when the FLAG_SETTINGS_PERSIST_VALUE flags were used
by the server).

To simplify implementation we refuse to use the persistent settings
feature and thereby avoid all the complexity related with its proper
support.

12 years agoSPDY: better name for frame entries counter.
Valentin Bartenev [Wed, 22 Jan 2014 00:58:19 +0000 (04:58 +0400)]
SPDY: better name for frame entries counter.

The "headers" is not a good term, since it is used not only to count
name/value pairs in the HEADERS block but to count SETTINGS entries too.

Moreover, one name/value pair in HEADERS can contain multiple http headers
with the same name.

No functional changes.

12 years agoSPDY: fixed possible segfault.
Valentin Bartenev [Wed, 22 Jan 2014 00:58:19 +0000 (04:58 +0400)]
SPDY: fixed possible segfault.

While processing a DATA frame, the link to related stream is stored in spdy
connection object as part of connection state.  But this stream can be closed
between receiving parts of the frame.

12 years agoTypo fixed.
Maxim Dounin [Tue, 21 Jan 2014 13:39:49 +0000 (17:39 +0400)]
Typo fixed.

12 years agoMail: fixed passing of IPv6 client address in XCLIENT.
Ruslan Ermilov [Fri, 17 Jan 2014 18:06:04 +0000 (22:06 +0400)]
Mail: fixed passing of IPv6 client address in XCLIENT.

12 years agoCore: improved ngx_reset_pool() (ticket #490).
Maxim Dounin [Fri, 17 Jan 2014 02:24:53 +0000 (06:24 +0400)]
Core: improved ngx_reset_pool() (ticket #490).

Previously pool->current wasn't moved back to pool, resulting in blocks
not used for further allocations if pool->current was already moved at the
time of ngx_reset_pool().  Additionally, to preserve logic of moving
pool->current, the p->d.failed counters are now properly cleared.  While
here, pool->chain is also cleared.

This change is essentially a nop with current code, but generally improves
things.

12 years agoSPDY: send output queue after processing of read event.
Valentin Bartenev [Wed, 15 Jan 2014 13:16:38 +0000 (17:16 +0400)]
SPDY: send output queue after processing of read event.

During the processing of input some control frames can be added to the queue.
And if there were no writing streams at the moment, these control frames might
be left unsent for a long time (or even forever).

This long delay is especially critical for PING replies since a client can
consider connection as broken and then resend exactly the same request over
a new connection, which is not safe in case of non-idempotent HTTP methods.

12 years agoSPDY: the SETTINGS frame should be allocated from sc->pool.
Valentin Bartenev [Wed, 15 Jan 2014 13:16:38 +0000 (17:16 +0400)]
SPDY: the SETTINGS frame should be allocated from sc->pool.

There is no reason to allocate it from connection pool that more like just
a bug especially since ngx_http_spdy_settings_frame_handler() already uses
sc->pool to free a chain.

12 years agoSPDY: fixed possible uninitialized memory access.
Valentin Bartenev [Wed, 15 Jan 2014 13:16:38 +0000 (17:16 +0400)]
SPDY: fixed possible uninitialized memory access.

The frame->stream pointer should always be initialized for control frames since
the check against it can be performed in ngx_http_spdy_filter_cleanup().

12 years agoSPDY: fixed off_t/size_t type conversions on 32 bits platforms.
Valentin Bartenev [Wed, 15 Jan 2014 09:23:31 +0000 (13:23 +0400)]
SPDY: fixed off_t/size_t type conversions on 32 bits platforms.

Parameters of ngx_http_spdy_filter_get_shadow() are changed from size_t to off_t
since the last call of the function may get size and offset from the rest of a
file buffer.  This fixes possible data loss rightfully complained by MSVC on 32
bits systems where off_t is 8 bytes long while size_t is only 4 bytes.

The other two type casts are needed just to suppress warnings about possible
data loss also complained by MSVC but false positive in these cases.

12 years agoSPDY: fixed build, broken by b7ee1bae0ffa.
Valentin Bartenev [Tue, 14 Jan 2014 21:44:52 +0000 (01:44 +0400)]
SPDY: fixed build, broken by b7ee1bae0ffa.

False positive warning about the "cl" variable may be uninitialized in
the ngx_http_spdy_filter_get_data_frame() call was suppressed.

It is always initialized either in the "while" cycle or in the following
"if" condition since frame_size cannot be zero.

12 years agoSPDY: added the "spdy_chunk_size" directive.
Valentin Bartenev [Tue, 14 Jan 2014 12:24:45 +0000 (16:24 +0400)]
SPDY: added the "spdy_chunk_size" directive.

12 years agoSPDY: implemented buffers chain splitting.
Valentin Bartenev [Tue, 14 Jan 2014 12:24:45 +0000 (16:24 +0400)]
SPDY: implemented buffers chain splitting.

It fixes "chain too big in spdy filter" alerts, and adds full support for rate
limiting of SPDY streams.

12 years agoSPDY: body filter was replaced by c->send_chain() function.
Valentin Bartenev [Tue, 14 Jan 2014 12:24:45 +0000 (16:24 +0400)]
SPDY: body filter was replaced by c->send_chain() function.

It allows to use ngx_http_write_filter() and all its rate limiting logic.

12 years agoSPDY: fixed possible premature close of stream.
Valentin Bartenev [Tue, 14 Jan 2014 12:24:45 +0000 (16:24 +0400)]
SPDY: fixed possible premature close of stream.

The "delayed" flag always should be set if there are unsent frames,
but this might not be the case if ngx_http_spdy_body_filter() was
called with NULL chain.

As a result, the "send_timeout" timer could be set on a stream in
ngx_http_writer().  And if the timeout occurred before all the stream
data has been sent, then the request was finalized with the "client
timed out" error.

12 years agoSPDY: refactored ngx_http_spdy_body_filter().
Valentin Bartenev [Tue, 14 Jan 2014 12:24:45 +0000 (16:24 +0400)]
SPDY: refactored ngx_http_spdy_body_filter().

A local pointer to fake connection is introduced
to slightly reduce further patches.

No functional changes.

12 years agoSPDY: elimination of r->blocked counter usage for queuing frames.
Valentin Bartenev [Tue, 14 Jan 2014 12:24:45 +0000 (16:24 +0400)]
SPDY: elimination of r->blocked counter usage for queuing frames.

It was used to prevent destroying of request object when there are unsent
frames in queue for the stream.  Since it was incremented for each frame
and is only 8 bits long, so it was not very hard to overflow the counter.

Now the stream->queued counter is checked instead.

12 years agoSPDY: better name for flag that indicates incomplete frame state.
Valentin Bartenev [Tue, 14 Jan 2014 12:24:45 +0000 (16:24 +0400)]
SPDY: better name for flag that indicates incomplete frame state.

No functional changes.

12 years agoSPDY: better name for queued frames counter.
Valentin Bartenev [Tue, 14 Jan 2014 12:24:45 +0000 (16:24 +0400)]
SPDY: better name for queued frames counter.

No functional changes.

12 years agoSPDY: fixed format specifiers in logging.
Valentin Bartenev [Tue, 14 Jan 2014 12:24:45 +0000 (16:24 +0400)]
SPDY: fixed format specifiers in logging.

12 years agoYear 2014.
Valentin Bartenev [Tue, 14 Jan 2014 12:24:02 +0000 (16:24 +0400)]
Year 2014.

12 years agoResolver: added support for domain names with a trailing dot.
Yichun Zhang [Fri, 10 Jan 2014 19:22:14 +0000 (11:22 -0800)]
Resolver: added support for domain names with a trailing dot.

12 years agoSSL: fixed ssl_verify_depth to take only one argument.
Maxim Dounin [Tue, 14 Jan 2014 11:56:40 +0000 (15:56 +0400)]
SSL: fixed ssl_verify_depth to take only one argument.

12 years agoSSL: ssl_session_tickets directive.
Dirkjan Bussink [Fri, 10 Jan 2014 15:12:40 +0000 (16:12 +0100)]
SSL: ssl_session_tickets directive.

This adds support so it's possible to explicitly disable SSL Session
Tickets. In order to have good Forward Secrecy support either the
session ticket key has to be reloaded by using nginx' binary upgrade
process or using an external key file and reloading the configuration.
This directive adds another possibility to have good support by
disabling session tickets altogether.

If session tickets are enabled and the process lives for a long a time,
an attacker can grab the session ticket from the process and use that to
decrypt any traffic that occured during the entire lifetime of the
process.

12 years agoFixed "zero size buf in output" alerts.
Maxim Dounin [Fri, 3 Jan 2014 23:32:22 +0000 (03:32 +0400)]
Fixed "zero size buf in output" alerts.

If a request had an empty request body (with Content-Length: 0), and there
were preread data available (e.g., due to a pipelined request in the buffer),
the "zero size buf in output" alert might be logged while proxying the
request to an upstream.

Similar alerts appeared with client_body_in_file_only if a request had an
empty request body.

12 years agoWin32: support for UTF-16 surrogate pairs (ticket #457).
Maxim Dounin [Fri, 3 Jan 2014 23:32:15 +0000 (03:32 +0400)]
Win32: support for UTF-16 surrogate pairs (ticket #457).

12 years agoUpstream: Cache-Control preferred over Expires.
Maxim Dounin [Fri, 3 Jan 2014 23:32:10 +0000 (03:32 +0400)]
Upstream: Cache-Control preferred over Expires.

Not really a strict check (as X-Accel-Expires might be ignored or
contain invalid value), but quite simple to implement and better
than what we have now.

12 years agoAdded per-process random seeding (ticket #456).
Maxim Dounin [Fri, 3 Jan 2014 23:32:06 +0000 (03:32 +0400)]
Added per-process random seeding (ticket #456).

12 years agoAllowed up to two EBUSY errors from sendfile().
Maxim Dounin [Fri, 3 Jan 2014 23:31:58 +0000 (03:31 +0400)]
Allowed up to two EBUSY errors from sendfile().

Fallback to synchronous sendfile() now only done on 3rd EBUSY without
any progress in a row.  Not falling back is believed to be better
in case of occasional EBUSY, though protection is still needed to
make sure there will be no infinite loop.

12 years agoFixed setting of content type in some cases.
Ruslan Ermilov [Fri, 27 Dec 2013 15:40:04 +0000 (19:40 +0400)]
Fixed setting of content type in some cases.

This fixes content type set in stub_status and autoindex responses
to be usable in content type checks made by filter modules, such
as charset and sub filters.

12 years agoStyle: removed surplus semicolons.
Valentin Bartenev [Fri, 27 Dec 2013 14:47:42 +0000 (18:47 +0400)]
Style: removed surplus semicolons.

12 years agoSPDY: a bit smarter ngx_http_spdy_filter_get_data_frame().
Valentin Bartenev [Thu, 26 Dec 2013 13:03:16 +0000 (17:03 +0400)]
SPDY: a bit smarter ngx_http_spdy_filter_get_data_frame().

There is no need to pass FLAG_FIN as a separate argument since it can always be
detected from the last_buf flag of the last frame buffer.

No functional changes.

12 years agoSPDY: refactored loop in ngx_http_spdy_body_filter().
Valentin Bartenev [Thu, 26 Dec 2013 13:03:16 +0000 (17:03 +0400)]
SPDY: refactored loop in ngx_http_spdy_body_filter().

No functional changes.

12 years agoSPDY: fixed possible request hang.
Valentin Bartenev [Thu, 26 Dec 2013 13:03:16 +0000 (17:03 +0400)]
SPDY: fixed possible request hang.

Processing events from upstream connection can result in sending queued frames
from other streams.  In this case such streams were not added to handling queue
and properly handled.

A global per connection flag was replaced by a per stream flag that indicates
currently sending stream while all other streams can be added to handling
queue.

12 years agoDav: emit a warning about unsafe URI.
Ruslan Ermilov [Mon, 23 Dec 2013 14:12:03 +0000 (18:12 +0400)]
Dav: emit a warning about unsafe URI.

12 years agoTeach ngx_http_parse_unsafe_uri() how to unescape URIs.
Ruslan Ermilov [Mon, 23 Dec 2013 14:12:00 +0000 (18:12 +0400)]
Teach ngx_http_parse_unsafe_uri() how to unescape URIs.

This fixes handling of escaped URIs in X-Accel-Redirect (ticket #316),
SSI (ticket #240), and DAV.

12 years agoDetect more unsafe URIs in ngx_http_parse_unsafe_uri().
Ruslan Ermilov [Mon, 23 Dec 2013 14:11:56 +0000 (18:11 +0400)]
Detect more unsafe URIs in ngx_http_parse_unsafe_uri().

The following URIs were considered safe: "..", "../foo", and "/foo/..".

12 years agoUpstream: keep $upstream_http_x_accel_redirect intact.
Ruslan Ermilov [Mon, 23 Dec 2013 14:11:46 +0000 (18:11 +0400)]
Upstream: keep $upstream_http_x_accel_redirect intact.

When processing the X-Accel-Redirect header, the value of the
$upstream_http_x_accel_redirect variable was also overwritten.

12 years agoFixed the first argument to getsockopt().
Ruslan Ermilov [Thu, 19 Dec 2013 09:43:18 +0000 (13:43 +0400)]
Fixed the first argument to getsockopt().

While here, always initialize the last argument.

12 years agoSSL: ssl_buffer_size directive.
Maxim Dounin [Fri, 20 Dec 2013 12:18:25 +0000 (16:18 +0400)]
SSL: ssl_buffer_size directive.

12 years agoUpstream: simplified peer selection loop in the "ip_hash" module.
Vladimir Homutov [Mon, 9 Dec 2013 09:43:27 +0000 (13:43 +0400)]
Upstream: simplified peer selection loop in the "ip_hash" module.

Conditions for skipping ineligible peers are rewritten to make adding of new
conditions simpler and be in line with the "round_robin" and "least_conn"
modules.  No functional changes.

12 years agoResolver: use minimum TTL for caching (ticket #329).
Ruslan Ermilov [Mon, 16 Dec 2013 15:12:23 +0000 (19:12 +0400)]
Resolver: use minimum TTL for caching (ticket #329).

12 years agoTypo fixed.
Maxim Dounin [Thu, 19 Dec 2013 09:50:23 +0000 (13:50 +0400)]
Typo fixed.

12 years agoSPDY: use predefined constant for size of the Stream-ID field.
Valentin Bartenev [Wed, 18 Dec 2013 14:39:29 +0000 (18:39 +0400)]
SPDY: use predefined constant for size of the Stream-ID field.

No functional changes.

12 years agoVersion bump.
Valentin Bartenev [Wed, 18 Dec 2013 14:37:48 +0000 (18:37 +0400)]
Version bump.

12 years agorelease-1.5.8 tag
Maxim Dounin [Tue, 17 Dec 2013 13:46:26 +0000 (17:46 +0400)]
release-1.5.8 tag

12 years agonginx-1.5.8-RELEASE release-1.5.8
Maxim Dounin [Tue, 17 Dec 2013 13:46:26 +0000 (17:46 +0400)]
nginx-1.5.8-RELEASE

12 years agoResolver: lookups are case-insensitive.
Ruslan Ermilov [Fri, 13 Dec 2013 16:49:52 +0000 (20:49 +0400)]
Resolver: lookups are case-insensitive.

12 years agoThe "ipv6=" boolean parameter of the "resolver" directive.
Ruslan Ermilov [Mon, 9 Dec 2013 06:53:30 +0000 (10:53 +0400)]
The "ipv6=" boolean parameter of the "resolver" directive.

When set to "off", only IPv4 addresses will be resolved,
and no AAAA queries are ever sent.

12 years agoResolver: implemented IPv6 name to address resolving.
Ruslan Ermilov [Mon, 9 Dec 2013 06:53:28 +0000 (10:53 +0400)]
Resolver: implemented IPv6 name to address resolving.

12 years agoResolver: implemented IPv6 address to name resolving.
Ruslan Ermilov [Fri, 6 Dec 2013 10:30:28 +0000 (14:30 +0400)]
Resolver: implemented IPv6 address to name resolving.

12 years agoChanged resolver API to use ngx_addr_t.
Ruslan Ermilov [Fri, 6 Dec 2013 10:30:27 +0000 (14:30 +0400)]
Changed resolver API to use ngx_addr_t.

12 years agoResolver: fixed indentation.
Ruslan Ermilov [Fri, 13 Dec 2013 15:22:44 +0000 (19:22 +0400)]
Resolver: fixed indentation.

12 years agoCore: externalized ngx_cmp_sockaddr().
Ruslan Ermilov [Fri, 6 Dec 2013 10:30:27 +0000 (14:30 +0400)]
Core: externalized ngx_cmp_sockaddr().

It's also extended with the "cmp_port" argument to indicate
whether ports should be compared as well, or only addresses.

12 years agoResolver: fixes in PTR processing.
Ruslan Ermilov [Fri, 6 Dec 2013 10:30:27 +0000 (14:30 +0400)]
Resolver: fixes in PTR processing.

Verify that class of RR is "IN".
Verify that RR data length is non-zero.

12 years agoResolver: fixes in A processing.
Ruslan Ermilov [Fri, 6 Dec 2013 10:30:27 +0000 (14:30 +0400)]
Resolver: fixes in A processing.

Verify that class of RR is "IN".
Verify that RR data length is exactly four octets.
Correctly shift to the next RR if RR type is unknown.

12 years agoResolver: fixed response processing.
Ruslan Ermilov [Fri, 6 Dec 2013 10:30:27 +0000 (14:30 +0400)]
Resolver: fixed response processing.

Stricten response header checks: ensure that reserved bits are zeroes,
and that the opcode is "standard query".

Fixed the "zero-length domain name in DNS response" condition.

12 years agoResolver: removed unnecessary casts.
Ruslan Ermilov [Fri, 6 Dec 2013 10:30:27 +0000 (14:30 +0400)]
Resolver: removed unnecessary casts.

12 years agoResolver: improved code readability.
Ruslan Ermilov [Fri, 6 Dec 2013 10:30:27 +0000 (14:30 +0400)]
Resolver: improved code readability.

Renamed ngx_resolver_query_t to ngx_resolver_hdr_t as it describes
the header that is common to DNS queries and answers.

Replaced the magic number 12 by the size of the header structure.

The other changes are self-explanatory.

12 years agoTrailing whitespace fix.
Maxim Dounin [Thu, 12 Dec 2013 16:28:48 +0000 (20:28 +0400)]
Trailing whitespace fix.

12 years agoUse ngx_chain_get_free_buf() in pipe input filters.
Valentin Bartenev [Wed, 11 Dec 2013 17:30:38 +0000 (21:30 +0400)]
Use ngx_chain_get_free_buf() in pipe input filters.

No functional changes.

12 years agoSPDY: drop the "delayed" flag when finalizing connection.
Valentin Bartenev [Tue, 10 Dec 2013 16:27:33 +0000 (20:27 +0400)]
SPDY: drop the "delayed" flag when finalizing connection.

This flag in SPDY fake write events serves the same purposes as the "ready"
flag in real events, and it must be dropped if request needs to be handled.
Otherwise, it can prevent the request from finalization if ngx_http_writer()
was set, which results in a connection leak.

Found by Xiaochen Wang.

12 years agoFixed handling of UNIX-domain sockets.
Ruslan Ermilov [Mon, 9 Dec 2013 06:16:44 +0000 (10:16 +0400)]
Fixed handling of UNIX-domain sockets.

When evaluating $local_port, $server_port, and $server_addr,
UNIX-domain sockets were mistakenly interpreted as IPv4 sockets.

12 years agoCore: keep the length of the local sockaddr.
Ruslan Ermilov [Mon, 9 Dec 2013 06:14:51 +0000 (10:14 +0400)]
Core: keep the length of the local sockaddr.

12 years agoFixed incorrect ngx_str_set() usage, broken in c82b2e020b9f.
Piotr Sikora [Sat, 7 Dec 2013 00:00:49 +0000 (16:00 -0800)]
Fixed incorrect ngx_str_set() usage, broken in c82b2e020b9f.

Found by Coverity Scan CID 1135525.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
12 years agoContrib: added vim to README.
Maxim Dounin [Fri, 6 Dec 2013 15:58:27 +0000 (19:58 +0400)]
Contrib: added vim to README.

12 years agoContrib: add vim scripts to contrib/ directory.
Evan Miller [Wed, 4 Dec 2013 22:45:44 +0000 (14:45 -0800)]
Contrib: add vim scripts to contrib/ directory.

I've been maintaining these scripts independently for a while now, even though
I'm no longer active in the community. Seems to me that contrib/ is a good
long-term home for the scripts.

12 years agoConfigure: enable -Wconditional-uninitialized with clang.
Ruslan Ermilov [Fri, 6 Dec 2013 09:16:56 +0000 (13:16 +0400)]
Configure: enable -Wconditional-uninitialized with clang.

12 years agoFixed build without SSL, broken by c82b2e020b9f.
Maxim Dounin [Wed, 4 Dec 2013 19:13:13 +0000 (23:13 +0400)]
Fixed build without SSL, broken by c82b2e020b9f.

12 years agoSSL support in the uwsgi module.
Maxim Dounin [Wed, 4 Dec 2013 19:01:27 +0000 (23:01 +0400)]
SSL support in the uwsgi module.

Based on patch by Roberto De Ioris.

12 years agoAdded support for TCP_FASTOPEN supported in Linux >= 3.7.1.
Mathew Rodley [Tue, 3 Dec 2013 18:07:03 +0000 (22:07 +0400)]
Added support for TCP_FASTOPEN supported in Linux >= 3.7.1.
---
 auto/unix                       | 12 ++++++++++++
 src/core/ngx_connection.c       | 32 ++++++++++++++++++++++++++++++++
 src/core/ngx_connection.h       |  4 ++++
 src/http/ngx_http.c             |  4 ++++
 src/http/ngx_http_core_module.c | 21 +++++++++++++++++++++
 src/http/ngx_http_core_module.h |  3 +++
 6 files changed, 76 insertions(+)

12 years agoFixed "setfib=" on non-first listening socket.
Maxim Dounin [Tue, 3 Dec 2013 17:44:08 +0000 (21:44 +0400)]
Fixed "setfib=" on non-first listening socket.