Merge pull request #474 from yzprofile/master

Fixed: fastcgi_check compatible with new health check module
Feature: rt support in sysguard module

Two new directives are introduced:
*) sysguard_mode and/or
*) sysguard_rt rt=time period=time action=some_location

This feature introduces the ability to limit requests based on "rt".
Also, all the measurements can be considered in an "and" or "or"
relationship due to the new "sysguard_mode" directive.

Test cases are included.

Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
Merge pull request #476 from InfoHunter/sysguard-rt.final

Feature: rt support in sysguard module
SPDY/3: drop the "delayed" flag when finalizing connection

This problem has been fixed for SPDY/2.
More details are available here: http://hg.nginx.org/nginx/rev/a279d2a33dbf
Merge pull request #489 from chobits/master

SPDY/3: drop the "delayed" flag when finalizing connection
Feature: upstream dynamic resolve

This is version 1, the "imperfect" version.

Introduces a new directive with two parameters into upstream context:

Directive:
    *) dynamic_resolve: enables dynamic resolving functionality on an upstream.

Parameters:
    *) fail_timeout=time, specifies how long tengine will not launch
       a dns query if the dns server is down.
    *) fallback=action, specifies what action to take if the dns server is
       considered as "down".

Support:
    *) use the first result of a dns response
    *) fail_timeout
    *) fallback action, but the action "stale" is limited to use what tengine gets
       when it parses the configuration

Not Support:
    *) all results from a dns response
    *) ipv6 address
    *) using stale dns data

All "Not support" stuff are now supported in "perfect" version, which
will be released after tengine is upgraded to original nginx 1.6.x
branch.

Test cases are included.

Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
Bugfix: /etc/resolv.conf parsing error with ipv6.
Merge pull request #496 from lifeibo/master

Bugfix: /etc/resolv.conf parsing error with ipv6.
Merge pull request #495 from InfoHunter/dyn-dns

Feature: upstream dynamic resolve
Bugfix: make test case independent

Use www.taobao.com to replace senginx.test in dynamic_resolve.t

Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
Bugfix: in ngx_http_upstream_dynamic_module

If fail_timeout is enabled and fallback action is specified
to either "stale" or "next", a segmentation fault would happen.

Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
Merge pull request #499 from InfoHunter/dyn-dns

Bugfix: in ngx_http_upstream_dynamic_module
Merge pull request #498 from InfoHunter/master

Bugfix: make test case independent
Introduce a built-in variable: $normalized_request

When working with key-value store, such as memcached, we usually use URL
to generate unique key for each object.

But unfortunately, each URL may have several forms, for example:

1) http://abc.com/search?text=Hello+G%C3%BCnter#h1
2) http://ABC.COM/search?text=Hello+G%c3%bcnter#h1
3) HTTP://abc.com/search?text=Hello+G%C3%BCnter#h3

All above froms are refer to the same object. So we have to normalize URL
before generating object key.

As we known, URL syntax looks like:
 <scheme>://<user>:<password>@<host>:<port>/<path>;<params>?<query>#<frag>

The $normalized_request variable is the normalized form of URL, which will:
 - exclude #<frag> part from URL.
 - convert <scheme> and <host> to lower-case.
 - convert all escape characters(%nn) in <path> to upper-case.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>