Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nginx/nginx
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: ngx-archive/nginx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: branches/stable-1.2
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Apr 26, 2012

  1. stable-1.2 branch

    mdounin committed Apr 26, 2012
    Copy the full SHA
    da62bc3 View commit details

Commits on Jun 4, 2012

  1. Version bump.

    mdounin committed Jun 4, 2012
    Copy the full SHA
    d9a65e9 View commit details
  2. Merge of r4611, r4620: resolver fixes.

    *) Fixed segmentation fault in ngx_resolver_create_name_query().
    
       If name passed for resolution was { 0, NULL } (e.g. as a result
       of name server returning CNAME pointing to ".") pointer wrapped
       to (void *) -1 resulting in segmentation fault on an attempt to
       dereference it.
    
       Reported by Lanshun Zhou.
    
    *) Resolver: protection from duplicate responses.
    
       If we already had CNAME in resolver node (i.e. rn->cnlen and rn->u.cname
       set), and got additional response with A record, it resulted in rn->cnlen
       set and rn->u.cname overwritten by rn->u.addr (or rn->u.addrs), causing
       segmentation fault later in ngx_resolver_free_node() on an attempt to free
       overwritten rn->u.cname.  The opposite (i.e. CNAME got after A) might cause
       similar problems as well.
    mdounin committed Jun 4, 2012
    Copy the full SHA
    5f29100 View commit details
  3. Copy the full SHA
    1ba4819 View commit details
  4. Copy the full SHA
    f87ed88 View commit details
  5. Merge of r4615: write handler reset in ngx_http_named_location().

    On internal redirects this happens via ngx_http_handler() call, which is
    not called on named location redirect.  As a result incorrect write handler
    remained (if previously set) and this might cause incorrect behaviour (likely
    request hang).
    
    Patch by Yichun Zhang (agentzh).
    mdounin committed Jun 4, 2012
    Copy the full SHA
    7162fde View commit details
  6. Merge of r4616: r->state fix.

    Added r->state reset on fastcgi/scgi/uwsgi request start.
    
    Failing to do so results in problems if 400 or 414 requests are
    redirected to fastcgi/scgi/uwsgi upstream, as well as after invalid
    headers got from upstream.  This was already fixed for proxy in r3478,
    but fastcgi (the only affected protocol at that time) was missed.
    
    Reported by Matthieu Tourne.
    mdounin committed Jun 4, 2012
    Copy the full SHA
    11f923c View commit details
  7. Merge of r4617: fastcgi padding fix.

    Fastcgi: fixed padding handling on fixed-size records.
    
    Padding was incorrectly ignored on end request, empty stdout and stderr
    fastcgi records.  This resulted in protocol desynchronization if fastcgi
    application used these records with padding for some reason.
    
    Reported by Ilia Vinokurov.
    mdounin committed Jun 4, 2012
    Copy the full SHA
    245cf55 View commit details
  8. Merge of r4618: rewrite escaping fix (ticket #162).

    The following code resulted in incorrect escaping of uri and possible
    segfault:
    
        location / {
            rewrite ^(.*) $1?c=$1;
            return 200 "$uri";
        }
    
    If there were arguments in a rewrite's replacement string, and length was
    actually calculated (due to duplicate captures as in the example above,
    or variables present), the is_args flag was set and incorrectly copied
    after length calculation.  This resulted in escaping applied to the uri part
    of the replacement, resulting in incorrect escaping.  Additionally, buffer
    was allocated without escaping expected, thus this also resulted in buffer
    overrun and possible segfault.
    mdounin committed Jun 4, 2012
    Copy the full SHA
    69d94a9 View commit details
  9. Merge of r4619: accept moderation on EMFILE/ENFILE.

    In case of EMFILE/ENFILE returned from accept() we disable accept events,
    and (in case of no accept mutex used) arm timer to re-enable them later.
    With accept mutex we just drop it, and rely on normal accept mutex handling
    to re-enable accept events once it's acquired again.
    
    As we now handle errors in question, logging level was changed to "crit"
    (instead of "alert" used for unknown errors).
    
    Note: the code might call ngx_enable_accept_events() multiple times if
    there are many listen sockets.  The ngx_enable_accept_events() function was
    modified to check if connection is already active (via c->read->active) and
    skip it then, thus making multiple calls safe.
    mdounin committed Jun 4, 2012
    Copy the full SHA
    9732c65 View commit details
  10. Merge of r4621, r4641: filter_finalize fixes.

    *) Fixed possible request hang with filter finalization.
    
       With r->filter_finalize set the ngx_http_finalize_connection() wasn't
       called from ngx_http_finalize_request() called with NGX_OK, resulting in
       r->main->count not being decremented, thus causing request hang in some
       rare situations.
    
       Patch by Yichun Zhang (agentzh).
    
    *) Fixed segfault with filter_finalize introduced in r4621 (1.3.0).
    
    See the following thread for more details:
    http://mailman.nginx.org/pipermail/nginx-devel/2012-May/002190.html
    mdounin committed Jun 4, 2012
    Copy the full SHA
    228d492 View commit details
  11. Merge of r4622, r4623: balancing changes.

    *) Upstream: smooth weighted round-robin balancing.
    
       For edge case weights like { 5, 1, 1 } we now produce { a, a, b, a, c, a, a }
       sequence instead of { c, b, a, a, a, a, a } produced previously.
    
       Algorithm is as follows: on each peer selection we increase current_weight
       of each eligible peer by its weight, select peer with greatest current_weight
       and reduce its current_weight by total number of weight points distributed
       among peers.
    
       In case of { 5, 1, 1 } weights this gives the following sequence of
       current_weight's:
    
            a  b  c
            0  0  0  (initial state)
    
            5  1  1  (a selected)
           -2  1  1
    
            3  2  2  (a selected)
           -4  2  2
    
            1  3  3  (b selected)
            1 -4  3
    
            6 -3  4  (a selected)
           -1 -3  4
    
            4 -2  5  (c selected)
            4 -2 -2
    
            9 -1 -1  (a selected)
            2 -1 -1
    
            7  0  0  (a selected)
            0  0  0
    
       To preserve weight reduction in case of failures the effective_weight
       variable was introduced, which usually matches peer's weight, but is
       reduced temporarily on peer failures.
    
       This change also fixes loop with backup servers and proxy_next_upstream
       http_404 (ticket #47), and skipping alive upstreams in some cases if there
       are multiple dead ones (ticket #64).
    
    *) Upstream: fixed ip_hash rebalancing with the "down" flag.
    
       Due to weight being set to 0 for down peers, order of peers after sorting
       wasn't the same as without the "down" flag (with down peers at the end),
       resulting in client rebalancing for clients on other servers.  The only
       rebalancing which should happen after adding "down" to a server is one
       for clients on the server.
    
       The problem was introduced in r1377 (which fixed endless loop by setting
       weight to 0 for down servers).  The loop is no longer possible with new
       smooth algorithm, so preserving original weight is safe.
    mdounin committed Jun 4, 2012
    Copy the full SHA
    21ad7d0 View commit details
  12. Merge of r4614, r4624-r4629, r4631: proxy recursive changes.

    *) Added IPv6 and UNIX-domain socket support in "debug_connection"
       directive.
    
    *) New function ngx_http_get_forwarded_addr() to look up real client
       address.
    
       On input it takes an original address, string in the X-Forwarded-For format
       and its length, list of trusted proxies, and a flag indicating to perform
       the recursive search.  On output it returns NGX_OK and the "deepest" valid
       address in a chain, or NGX_DECLINED.  It supports AF_INET and AF_INET6.
       Additionally, original address and/or proxy may be specified as AF_UNIX.
    
    *) Realip: chains of trusted proxies and IPv6 support.
    
       The module now supports recursive search of client address through
       the chain of trusted proxies, controlled by the "real_ip_recursive"
       directive (closes #2).  It also gets full IPv6 support (closes #44)
       and canonical value of the $client_addr variable on address change.
    
       Example:
    
           real_ip_header X-Forwarded-For;
           set_real_ip_from 127.0.0.0/8;
           set_real_ip_from ::1;
           set_real_ip_from unix:;
           real_ip_recursive on;
    
    *) Geo: chains of trusted proxies and partial IPv6 support.
    
       The module now supports recursive search of client address through
       the chain of trusted proxies, controlled by the "proxy_recursive"
       directive in the "geo" block.  It also gets partial IPv6 support:
       now proxies may be specified with IPv6 addresses.
    
       Example:
    
           geo $test {
               ...
               proxy 127.0.0.1;
               proxy ::1;
               proxy_recursive;
           }
    
       There's also a slight change in behavior.  When original client
       address (as specified by the "geo" directive) is one of the
       trusted proxies, and the value of the X-Forwarded-For request
       header cannot not be parsed as a valid address, an original client
       address will be used for lookup.  Previously, 255.255.255.255 was
       used in this case.
    
    *) Geoip: trusted proxies support and partial IPv6 support.
    
       The module now supports recursive search of client address through the
       chain of trusted proxies (closes #100), in the same scope as the geo
       module.  Proxies are listed by the "geoip_proxy" directive, recursive
       search is enabled by the "geoip_proxy_recursive" directive.  IPv6 is
       partially supported: proxies may be specified with IPv6 addresses.
    
       Example:
    
            geoip_country .../GeoIP.dat;
            geoip_proxy 127.0.0.1;
            geoip_proxy ::1;
            geoip_proxy 10.0.0.0/8;
            geoip_proxy_recursive on;
    mdounin committed Jun 4, 2012
    Copy the full SHA
    8acd40c View commit details
  13. Merge of r4630: fixed c->sent with unbuffered ssl.

    Update c->sent in ngx_ssl_send_chain() even if SSL buffer is not used.
    mdounin committed Jun 4, 2012
    Copy the full SHA
    88050e5 View commit details

Commits on Jun 5, 2012

  1. Copy the full SHA
    4624fd5 View commit details
  2. Merge of r4674, r4675, r4676: win32 fixes.

    *) Win32: disallowed access to various non-canonical name variants.
    
       This includes trailings dots and spaces, NTFS streams (and short names, as
       previously checked).  The checks are now also done in ngx_file_info(), thus
       allowing to use the "try_files" directive to protect external scripts.
    
    *) Win32: normalization of trailing dot inside uri.
    
       Windows treats "/directory./" identical to "/directory/".  Do the same
       when working on Windows.  Note that the behaviour is different from one
       with last path component (where multiple spaces and dots are ignored by
       Windows).
    
    *) Win32: uris with ":$" are now rejected.
    
       There are too many problems with special NTFS streams, notably "::$data",
       "::$index_allocation" and ":$i30:$index_allocation".
    
       For now we don't reject all URIs with ":" like Apache does as there are no
       good reasons seen yet, and there are multiple programs using it in URLs
       (e.g. MediaWiki).
    mdounin committed Jun 5, 2012
    Copy the full SHA
    b683a85 View commit details
  3. nginx-1.2.1-RELEASE

    mdounin committed Jun 5, 2012
    Copy the full SHA
    c598426 View commit details

Commits on Jun 25, 2012

  1. Copy the full SHA
    a1d0934 View commit details
  2. Version bump.

    mdounin committed Jun 25, 2012
    Copy the full SHA
    1917d87 View commit details
  3. Copy the full SHA
    e9bc178 View commit details

Commits on Jun 26, 2012

  1. Copy the full SHA
    a4b7871 View commit details

Commits on Jun 29, 2012

  1. Merge of r4636, r4637, r4638: config sanity checks.

    *) Added syntax checking of the second parameter of the "split_clients"
       directive.
    
    *) Capped the status code that may be returned with "return" and
       "try_files".
    
    *) Zero padded the returned and logged HTTP status code, and fixed possible
       buffer overrun in $status handling.
    mdounin committed Jun 29, 2012
    Copy the full SHA
    71b7e22 View commit details
  2. Merge of r4639, r4640: C++ fixes.

    Fixed the ngx_regex.h header file compatibility with C++.  Fixed
    building --with-cpp_test_module on some systems.
    mdounin committed Jun 29, 2012
    Copy the full SHA
    917e4ab View commit details

Commits on Jul 2, 2012

  1. Merge of r4642:

    Fixed core variables dynamic access after reconfiguration.
    
    If variable was indexed in previous configuration but not in current
    one, the NGX_HTTP_VAR_INDEXED flag was left set and confused
    ngx_http_get_variable().
    
    Patch by Yichun Zhang (agentzh), slightly modified.
    mdounin committed Jul 2, 2012
    Copy the full SHA
    e5ae5b6 View commit details
  2. Merge of r4643:

    Removed historical and now redundant syntax pre-checks in ngx_parse_url().
    mdounin committed Jul 2, 2012
    Copy the full SHA
    ab2ca17 View commit details
  3. Merge of r4644:

    Fixed potential null pointer dereference in ngx_resolver_create().
    While here, improved error message.
    mdounin committed Jul 2, 2012
    Copy the full SHA
    ac12c5f View commit details
  4. Merge of r4646: jemalloc 3.0.0 compatibility.

    Fixed compilation with -DNGX_DEBUG_MALLOC on FreeBSD 10.
    
    After jemalloc 3.0.0 import there is no _malloc_options symbol, it has
    been replaced with the malloc_conf one with a different syntax.
    mdounin committed Jul 2, 2012
    Copy the full SHA
    ef03533 View commit details
  5. Merge of r4647: xslt reuse.

    Fixed the reuse of parsed DTDs and XSLTs.
    
    Patch by Kuramoto Eiji.
    mdounin committed Jul 2, 2012
    Copy the full SHA
    049447b View commit details
  6. Merge of r4648, r4649, r4650: memory leak with $geoip_org.

    Patch by Denis F. Latypoff (slightly modified).
    mdounin committed Jul 2, 2012
    Copy the full SHA
    0b23391 View commit details
  7. Merge of r4651: proxy_cookie_* fix.

    Fixed returned value handling from the cookie rewrite handler.
    
    If the "proxy_cookie_domain" or "proxy_cookie_path" directive is used and there
    are no matches in Set-Cookie header then ngx_http_proxy_rewrite_cookie() returns
    NGX_DECLINED to indicate that the header was not rewritten. Returning this value
    further from the upstream headers copy handler resulted in 500 error response.
    
    See here for report:
    http://mailman.nginx.org/pipermail/nginx/2012-May/033858.html
    mdounin committed Jul 2, 2012
    Copy the full SHA
    6d92e76 View commit details
  8. Merge of r4652: ssl without buffer should not set c->buffered.

    Removed mistaken setting of NGX_SSL_BUFFERED flag in ngx_ssl_send_chain()
    if SSL buffer is not used.
    mdounin committed Jul 2, 2012
    Copy the full SHA
    fb6e762 View commit details
  9. Merge of r4653: ngx_inet.c code reduction.

    Code reduction (no functional changes).
    mdounin committed Jul 2, 2012
    Copy the full SHA
    3a01798 View commit details
  10. Copy the full SHA
    cd8c055 View commit details
  11. Merge of r4654, r4672, r4684, r4685, r4692: resolver changes.

    *) Resolver: fixed format specification.
       Patch by Yichun Zhang (agentzh).
    
    *) Support for IPv6 literals and an optional port in resolver.
    
    *) Fixed crash in ngx_resolver_cleanup_tree().
    
       If sending a DNS request fails with an error (e.g., when mistakenly
       trying to send it to a local IP broadcast), such a request is not
       deleted if there are clients waiting on it.  However, it was still
       erroneously removed from the queue.  Later ngx_resolver_cleanup_tree()
       attempted to remove it from the queue again that resulted in a NULL
       pointer dereference.
    
    *) When "resolver" is configured with a domain name, only the first
       resolved address was used.  Now all addresses will be used.
    
    *) Fixed segfault with poll and resolver used.
    
       Poll event method needs ngx_cycle->files to work, and use of
       ngx_exit_cycle without files set caused null pointer dereference in
       resolver's cleanup on udp socket close.
    mdounin committed Jul 2, 2012
    Copy the full SHA
    bb612f1 View commit details
  12. Merge of r4655, r4656, r4657, r4695, r4696: upstream changes.

    *) Upstream: least_conn balancer module.
    
    *) Upstream: weights and IPv6 support in ip_hash balancer.
    
    *) Upstream keepalive: "single" parameter deprecated.
    mdounin committed Jul 2, 2012
    Copy the full SHA
    eaf3544 View commit details
  13. Merge of r4682, r4694, r4699, r4704, r4705: minor nits.

    *) Fixed spelling of "endianness", and called it "byte ordering" in the
       user visible part.
    
    *) Fixed return type of ngx_strerror_init().
    
    *) Fixed a harmless error in spelling of "Connection: close" when computing
       the response header length.
    
    *) Style.
    
    *) Added code to look up Google perftools in /opt/local/, for MacPorts.
    mdounin committed Jul 2, 2012
    Copy the full SHA
    7138ca1 View commit details
  14. Merge of r4686, r4687: $status variable.

    Contains response status code as a 3-digit integer
    (with leading zeroes if necessary), or one of the following values:
    
        000 - response status code has not yet been assigned
        009 - HTTP/0.9 request is being processed
    mdounin committed Jul 2, 2012
    Copy the full SHA
    c7fcd1e View commit details
  15. Merge of r4688, r4689, r4706:

    *) Mp4: fixed non-keyframe seeks in some cases (ticket #175).
    
       Number of entries in stsc atom was wrong if we've added an entry to
       split a chunk.
    
       Additionally, there is no need to add an entry if we are going to split
       last chunk in an entry, it's enough to update the entry we already have.
       Previously new entry was added and old one was left as is, resulting in
       incorrect entry with zero chunks which might confuse some software.
    
    *) Mp4: fixed streaming if moov atom is at buffer edge.
    mdounin committed Jul 2, 2012
    Copy the full SHA
    02f8e0e View commit details
  16. Merge of r4690: conflicting wildcard server names fix.

    With previous code wildcard names were added to hash even if conflict
    was detected.  This resulted in identical names in hash and segfault
    later in ngx_hash_wildcard_init().
    mdounin committed Jul 2, 2012
    Copy the full SHA
    63c3d48 View commit details
  17. Merge of r4691: changed default alignment to 16.

    This fixes alignment problems observerd on ARMs, and likely also needed
    for MIPSes.  Unless we know alignment is not required just assume we
    need 16, which appears to be safe default for all architectures.
    
    See here for details:
    http://mailman.nginx.org/pipermail/nginx/2012-June/034139.html
    mdounin committed Jul 2, 2012
    Copy the full SHA
    a663397 View commit details
  18. Merge of r4693: fixed "sendmsg() failed" alerts on HP-UX.

    HP-UX needs _HPUX_ALT_XOPEN_SOCKET_API to be defined to be able to
    use various POSIX versions of networking functions.  Notably sendmsg()
    resulted in "sendmsg() failed (9: Bad file number)" alerts without it.
    
    See xopen_networking(7) for more details.
    mdounin committed Jul 2, 2012
    Copy the full SHA
    37cf05e View commit details
  19. Merge of r4697: disabled gzip in OpenSSL prior to 1.0.0.

    Disabled gzip compression in OpenSSL prior to 1.0.0 version.
    This saves about 522K per connection.
    mdounin committed Jul 2, 2012
    Copy the full SHA
    d4ee957 View commit details
  20. Merge of r4698: X-Forwarded-For conditionals.

    Fixed compile-time conditionals used to detect if X-Forwarded-For support
    is needed.
    
    Note: compatibility shims were added during merge to avoid possible
    breakage of 3rd party modules.  At least cache purge module was broken
    by the original commit, as it used to rely on NGX_HTTP_PROXY define.
    mdounin committed Jul 2, 2012
    Copy the full SHA
    92486bd View commit details

Commits on Jul 3, 2012

  1. nginx-1.2.2-RELEASE

    mdounin committed Jul 3, 2012
    Copy the full SHA
    fab212d View commit details
  2. release-1.2.2 tag

    mdounin committed Jul 3, 2012
    Copy the full SHA
    94fdcd5 View commit details

Commits on Aug 6, 2012

  1. Merge of r4713: map hostnames fix (ticket #182).

    The final dot wasn't stripped before looking up in a map of hostnames.
    mdounin committed Aug 6, 2012
    Copy the full SHA
    51130c8 View commit details
  2. Merge of r4736: typo fixed.

    mdounin committed Aug 6, 2012
    Copy the full SHA
    7886114 View commit details
  3. Merge of r4737: r->uri_changed in a named location fix.

    Reset r->uri_changed in a named location (ticket #184).
    mdounin committed Aug 6, 2012
    Copy the full SHA
    003a2e0 View commit details
  4. Merge of r4738: struct flock initialization.

    Made sure to initialize the entire "struct flock" allocated on stack.
    mdounin committed Aug 6, 2012
    Copy the full SHA
    c14faaa View commit details
  5. Copy the full SHA
    b3f5ddf View commit details
Showing with 4,950 additions and 1,503 deletions.
  1. +9 −0 .hgtags
  2. +98 −0 auto/cc/clang
  3. +6 −0 auto/cc/conf
  4. +1 −3 auto/cc/gcc
  5. +0 −3 auto/cc/msvc
  6. +14 −26 auto/cc/name
  7. +3 −0 auto/configure
  8. +5 −5 auto/{endianess → endianness}
  9. +1 −1 auto/install
  10. +17 −2 auto/lib/geoip/conf
  11. +16 −0 auto/lib/google-perftools/conf
  12. +1 −1 auto/lib/libatomic/make
  13. +1 −1 auto/lib/libgd/conf
  14. +1 −0 auto/lib/pcre/conf
  15. +9 −1 auto/lib/perl/conf
  16. +4 −5 auto/lib/perl/make
  17. +4 −1 auto/lib/zlib/conf
  18. +5 −3 auto/lib/zlib/makefile.bcc
  19. +5 −2 auto/lib/zlib/makefile.msvc
  20. +2 −2 auto/lib/zlib/makefile.owc
  21. +3 −3 auto/make
  22. +10 −0 auto/modules
  23. +7 −0 auto/options
  24. +2 −0 auto/os/conf
  25. +5 −0 auto/sources
  26. +1 −1 auto/unix
  27. +18 −28 docs/GNUmakefile
  28. +2 −2 docs/dtd/changes.dtd
  29. +14 −11 docs/html/50x.html
  30. +19 −2 docs/html/index.html
  31. +2 −2 docs/man/nginx.8
  32. +5 −4 docs/text/LICENSE
  33. +958 −4 docs/xml/nginx/changes.xml
  34. +29 −29 docs/xsls/dump.xsls
  35. +82 −49 misc/GNUmakefile
  36. +42 −5 src/core/nginx.c
  37. +2 −2 src/core/nginx.h
  38. +24 −43 src/core/ngx_conf_file.c
  39. +3 −11 src/core/ngx_conf_file.h
  40. +4 −2 src/core/ngx_connection.c
  41. +10 −2 src/core/ngx_crypt.c
  42. +24 −37 src/core/ngx_cycle.c
  43. +1 −1 src/core/ngx_cycle.h
  44. +10 −10 src/core/ngx_file.c
  45. +1 −1 src/core/ngx_file.h
  46. +13 −11 src/core/ngx_hash.c
  47. +33 −32 src/core/ngx_inet.c
  48. +1 −1 src/core/ngx_inet.h
  49. +203 −6 src/core/ngx_radix_tree.c
  50. +9 −0 src/core/ngx_radix_tree.h
  51. +3 −3 src/core/ngx_regex.c
  52. +2 −2 src/core/ngx_regex.h
  53. +74 −29 src/core/ngx_resolver.c
  54. +6 −6 src/core/ngx_shmtx.c
  55. +1 −1 src/core/ngx_shmtx.h
  56. +3 −7 src/core/ngx_slab.c
  57. +1 −1 src/core/ngx_string.c
  58. +1 −1 src/core/ngx_string.h
  59. +4 −0 src/core/ngx_times.c
  60. +9 −5 src/event/modules/ngx_epoll_module.c
  61. +31 −0 src/event/modules/ngx_eventport_module.c
  62. +2 −2 src/event/modules/ngx_poll_module.c
  63. +12 −0 src/event/modules/ngx_rtsig_module.c
  64. +72 −30 src/event/ngx_event.c
  65. +0 −6 src/event/ngx_event.h
  66. +90 −13 src/event/ngx_event_accept.c
  67. +70 −16 src/event/ngx_event_openssl.c
  68. +7 −0 src/event/ngx_event_openssl.h
  69. +9 −2 src/event/ngx_event_pipe.c
  70. +38 −49 src/http/modules/ngx_http_auth_basic_module.c
  71. +5 −2 src/http/modules/ngx_http_autoindex_module.c
  72. +5 −0 src/http/modules/ngx_http_dav_module.c
  73. +51 −41 src/http/modules/ngx_http_fastcgi_module.c
  74. +1 −1 src/http/modules/ngx_http_flv_module.c
  75. +350 −146 src/http/modules/ngx_http_geo_module.c
  76. +295 −45 src/http/modules/ngx_http_geoip_module.c
  77. +5 −1 src/http/modules/ngx_http_gzip_filter_module.c
  78. +1 −1 src/http/modules/ngx_http_gzip_static_module.c
  79. +1 −0 src/http/modules/ngx_http_headers_filter_module.c
  80. +27 −13 src/http/modules/ngx_http_image_filter_module.c
  81. +5 −5 src/http/modules/ngx_http_index_module.c
  82. +6 −2 src/http/modules/ngx_http_limit_conn_module.c
  83. +7 −4 src/http/modules/ngx_http_limit_req_module.c
  84. +382 −78 src/http/modules/ngx_http_log_module.c
  85. +15 −23 src/http/modules/ngx_http_map_module.c
  86. +26 −2 src/http/modules/ngx_http_mp4_module.c
  87. +13 −7 src/http/modules/ngx_http_proxy_module.c
  88. +45 −93 src/http/modules/ngx_http_realip_module.c
  89. +6 −0 src/http/modules/ngx_http_rewrite_module.c
  90. +3 −1 src/http/modules/ngx_http_scgi_module.c
  91. +15 −2 src/http/modules/ngx_http_secure_link_module.c
  92. +8 −1 src/http/modules/ngx_http_split_clients_module.c
  93. +1 −0 src/http/modules/ngx_http_ssi_filter_module.c
  94. +2 −2 src/http/modules/ngx_http_ssl_module.c
  95. +1 −1 src/http/modules/ngx_http_stub_status_module.c
  96. +2 −2 src/http/modules/ngx_http_sub_filter_module.c
  97. +44 −17 src/http/modules/ngx_http_upstream_ip_hash_module.c
  98. +9 −40 src/http/modules/ngx_http_upstream_keepalive_module.c
  99. +400 −0 src/http/modules/ngx_http_upstream_least_conn_module.c
  100. +3 −1 src/http/modules/ngx_http_uwsgi_module.c
  101. +4 −4 src/http/modules/ngx_http_xslt_filter_module.c
  102. +3 −14 src/http/modules/perl/Makefile.PL
  103. +2 −2 src/http/modules/perl/nginx.pm
  104. +1 −1 src/http/modules/perl/nginx.xs
  105. +5 −0 src/http/ngx_http.c
  106. +0 −1 src/http/ngx_http.h
  107. +119 −12 src/http/ngx_http_core_module.c
  108. +3 −0 src/http/ngx_http_core_module.h
  109. +0 −2 src/http/ngx_http_file_cache.c
  110. +3 −3 src/http/ngx_http_header_filter_module.c
  111. +20 −0 src/http/ngx_http_parse.c
  112. +1 −0 src/http/ngx_http_parse_time.c
  113. +50 −25 src/http/ngx_http_request.c
  114. +8 −1 src/http/ngx_http_request.h
  115. +51 −42 src/http/ngx_http_request_body.c
  116. +3 −8 src/http/ngx_http_script.c
  117. +3 −2 src/http/ngx_http_special_response.c
  118. +58 −18 src/http/ngx_http_upstream.c
  119. +90 −176 src/http/ngx_http_upstream_round_robin.c
  120. +6 −1 src/http/ngx_http_upstream_round_robin.h
  121. +318 −8 src/http/ngx_http_variables.c
  122. +0 −3 src/http/ngx_http_variables.h
  123. +8 −12 src/http/ngx_http_write_filter_module.c
  124. +11 −0 src/mail/ngx_mail.c
  125. +1 −1 src/mail/ngx_mail_auth_http_module.c
  126. +22 −12 src/mail/ngx_mail_core_module.c
  127. +0 −2 src/mail/ngx_mail_handler.c
  128. +3 −0 src/mail/ngx_mail_parse.c
  129. +2 −0 src/misc/ngx_cpp_test_module.cpp
  130. +2 −0 src/os/unix/ngx_atomic.h
  131. +1 −1 src/os/unix/ngx_errno.c
  132. +3 −1 src/os/unix/ngx_errno.h
  133. +9 −11 src/os/unix/ngx_files.c
  134. +2 −2 src/os/unix/ngx_freebsd_init.c
  135. +1 −0 src/os/unix/ngx_posix_config.h
  136. +4 −0 src/os/unix/ngx_posix_init.c
  137. +0 −4 src/os/unix/ngx_process.c
  138. +35 −22 src/os/unix/ngx_process_cycle.c
  139. +3 −0 src/os/unix/ngx_solaris_sendfilev_chain.c
  140. +13 −14 src/os/unix/ngx_user.c
  141. +1 −1 src/os/win32/ngx_errno.c
  142. +3 −1 src/os/win32/ngx_errno.h
  143. +164 −33 src/os/win32/ngx_files.c
  144. +1 −0 src/os/win32/ngx_process.c
  145. +4 −4 src/os/win32/ngx_process_cycle.c
  146. +1 −0 src/os/win32/ngx_win32_config.h
9 changes: 9 additions & 0 deletions .hgtags
Original file line number Diff line number Diff line change
@@ -335,3 +335,12 @@ f7e1113a9a1648cad122543e7080e895cf2d88f4 release-1.1.17
2b22743c3079b41233ded0fc35af8aa89bcfab91 release-1.1.18
0f0b425659e0b26f5bc8ea14a42dbf34de2eaba6 release-1.1.19
f582d662cc408eb7a132c21f4b298b71d0701abb release-1.2.0
fee2dae560e38891a8eb9bfefa818e2652a2c48e release-1.2.1
f9d796a201daa411de38c7a0e7282d743c163780 release-1.2.2
e3786c39d06097a0e5d2d9791b5f3dc229313361 release-1.2.3
e8aa72e49ef3e5cf6aaebff6ab8d56207b8ab8b4 release-1.2.4
d763d5c9a13395fb78100f7c2d63c2323541f210 release-1.2.5
eb1043eaedacddb1bbada27822527049b99bde6d release-1.2.6
a58e268f6c081f671667c0c929f0c5cec3e80958 release-1.2.7
d50f390fa97eb9871622666b40703d497d65925e release-1.2.8
0e80c5bf5e1bb42a6491fea5340a16e51cd37bb8 release-1.2.9
98 changes: 98 additions & 0 deletions auto/cc/clang
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@

# Copyright (C) Nginx, Inc.


# clang


NGX_CLANG_VER=`$CC -v 2>&1 | grep 'clang version' 2>&1 \
| sed -e 's/^.*clang version \(.*\)/\1/'`

echo " + clang version: $NGX_CLANG_VER"

have=NGX_COMPILER value="\"clang $NGX_CLANG_VER\"" . auto/define


CC_TEST_FLAGS="-pipe"


# optimizations

#NGX_CLANG_OPT="-O2"
#NGX_CLANG_OPT="-Oz"
NGX_CLANG_OPT="-O"

case $CPU in
pentium)
# optimize for Pentium
CPU_OPT="-march=pentium"
NGX_CPU_CACHE_LINE=32
;;

pentiumpro | pentium3)
# optimize for Pentium Pro, Pentium II and Pentium III
CPU_OPT="-march=pentiumpro"
NGX_CPU_CACHE_LINE=32
;;

pentium4)
# optimize for Pentium 4
CPU_OPT="-march=pentium4"
NGX_CPU_CACHE_LINE=128
;;

athlon)
# optimize for Athlon
CPU_OPT="-march=athlon"
NGX_CPU_CACHE_LINE=64
;;

opteron)
# optimize for Opteron
CPU_OPT="-march=opteron"
NGX_CPU_CACHE_LINE=64
;;

esac

CC_AUX_FLAGS="$CC_AUX_FLAGS $CPU_OPT"


CFLAGS="$CFLAGS -pipe $CPU_OPT"

if [ ".$PCRE_OPT" = "." ]; then
PCRE_OPT="-O2 -pipe $CPU_OPT"
else
PCRE_OPT="$PCRE_OPT -pipe"
fi

if [ ".$MD5_OPT" = "." ]; then
MD5_OPT="-O2 -pipe $CPU_OPT"
else
MD5_OPT="$MD5_OPT -pipe"
fi

if [ ".$ZLIB_OPT" = "." ]; then
ZLIB_OPT="-O2 -pipe $CPU_OPT"
else
ZLIB_OPT="$ZLIB_OPT -pipe"
fi


# warnings

CFLAGS="$CFLAGS $NGX_CLANG_OPT -Wall -Wextra -Wpointer-arith"
#CFLAGS="$CFLAGS -Wmissing-prototypes"

# we have a lot of unused function arguments
CFLAGS="$CFLAGS -Wno-unused-parameter"

# stop on warning
#CFLAGS="$CFLAGS -Werror"

# debug
CFLAGS="$CFLAGS -g"

if [ ".$CPP" = "." ]; then
CPP="$CC -E"
fi
6 changes: 6 additions & 0 deletions auto/cc/conf
Original file line number Diff line number Diff line change
@@ -56,6 +56,12 @@ else
. auto/cc/gcc
;;

clang)
# Clang C compiler

. auto/cc/clang
;;

icc)
# Intel C++ compiler 7.1, 8.0, 8.1

4 changes: 1 addition & 3 deletions auto/cc/gcc
Original file line number Diff line number Diff line change
@@ -149,15 +149,13 @@ CFLAGS="$CFLAGS ${NGX_GCC_OPT:--O} -W"
CFLAGS="$CFLAGS -Wall -Wpointer-arith"
#CFLAGS="$CFLAGS -Wconversion"
#CFLAGS="$CFLAGS -Winline"
#CFLAGS="$CFLAGS -Wmissing-prototypes"


case "$NGX_GCC_VER" in
3.* | 4.* )
# we have a lot of the unused function arguments
CFLAGS="$CFLAGS -Wno-unused-parameter"
CFLAGS="$CFLAGS -Wunused-function"
CFLAGS="$CFLAGS -Wunused-variable"
CFLAGS="$CFLAGS -Wunused-value"
# 4.2.1 shows the warning in wrong places
#CFLAGS="$CFLAGS -Wunreachable-code"
;;
3 changes: 0 additions & 3 deletions auto/cc/msvc
Original file line number Diff line number Diff line change
@@ -73,9 +73,6 @@ CFLAGS="$CFLAGS -WX"
# disable logo
CFLAGS="$CFLAGS -nologo"


LINK="\$(CC)"

# the link flags
CORE_LINK="$CORE_LINK -link -verbose:lib"

40 changes: 14 additions & 26 deletions auto/cc/name
Original file line number Diff line number Diff line change
@@ -32,14 +32,14 @@ if [ "$CC" = cl ]; then
NGX_CC_NAME=msvc10
echo " + using Microsoft Visual C++ 10 compiler"

else if `$NGX_WINE $CC -v 2>&1 \
elif `$NGX_WINE $CC -v 2>&1 \
| grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14' \
>/dev/null 2>&1`; then

NGX_CC_NAME=msvc8
echo " + using Microsoft Visual C++ 8 compiler"

else if `$NGX_WINE $CC -v 2>&1 \
elif `$NGX_WINE $CC -v 2>&1 \
| grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13' \
>/dev/null 2>&1`; then

@@ -50,52 +50,40 @@ if [ "$CC" = cl ]; then
NGX_CC_NAME=msvc
echo " + using Microsoft Visual C++ compiler"
fi
fi
fi

else
if [ "$CC" = wcl386 ]; then
elif [ "$CC" = wcl386 ]; then
NGX_CC_NAME=owc
echo " + using Open Watcom C compiler"

else
if [ "$CC" = bcc32 ]; then
elif [ "$CC" = bcc32 ]; then
NGX_CC_NAME=bcc
echo " + using Borland C++ compiler"

else
if `$CC -V 2>&1 | grep '^Intel(R) C' >/dev/null 2>&1`; then
elif `$CC -V 2>&1 | grep '^Intel(R) C' >/dev/null 2>&1`; then
NGX_CC_NAME=icc
echo " + using Intel C++ compiler"

else
if `$CC -v 2>&1 | grep 'gcc version' >/dev/null 2>&1`; then
elif `$CC -v 2>&1 | grep 'gcc version' >/dev/null 2>&1`; then
NGX_CC_NAME=gcc
echo " + using GNU C compiler"

else
if `$CC -V 2>&1 | grep 'Sun C' >/dev/null 2>&1`; then
elif `$CC -v 2>&1 | grep 'clang version' >/dev/null 2>&1`; then
NGX_CC_NAME=clang
echo " + using Clang C compiler"

elif `$CC -V 2>&1 | grep 'Sun C' >/dev/null 2>&1`; then
NGX_CC_NAME=sunc
echo " + using Sun C compiler"

else
if `$CC -V 2>&1 | grep '^Compaq C' >/dev/null 2>&1`; then
elif `$CC -V 2>&1 | grep '^Compaq C' >/dev/null 2>&1`; then
NGX_CC_NAME=ccc
echo " + using Compaq C compiler"

else
if `$CC -V 2>&1 | grep '^aCC: ' >/dev/null 2>&1`; then
elif `$CC -V 2>&1 | grep '^aCC: ' >/dev/null 2>&1`; then
NGX_CC_NAME=acc
echo " + using HP aC++ compiler"

else
NGX_CC_NAME=unknown

fi # acc
fi # ccc
fi # sunc
fi # icc
fi # gcc
fi # bcc
fi # owc
fi # msvc
fi
3 changes: 3 additions & 0 deletions auto/configure
Original file line number Diff line number Diff line change
@@ -4,6 +4,9 @@
# Copyright (C) Nginx, Inc.


LC_ALL=C
export LC_ALL

. auto/options
. auto/init
. auto/sources
10 changes: 5 additions & 5 deletions auto/endianess → auto/endianness
Original file line number Diff line number Diff line change
@@ -3,9 +3,9 @@
# Copyright (C) Nginx, Inc.


echo $ngx_n "checking for system endianess ...$ngx_c"
echo $ngx_n "checking for system byte ordering ...$ngx_c"
echo >> $NGX_ERR
echo "checking for system endianess" >> $NGX_ERR
echo "checking for system byte ordering" >> $NGX_ERR


cat << END > $NGX_AUTOTEST.c
@@ -28,10 +28,10 @@ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"

if [ -x $NGX_AUTOTEST ]; then
if $NGX_AUTOTEST >/dev/null 2>&1; then
echo " little endianess"
echo " little endian"
have=NGX_HAVE_LITTLE_ENDIAN . auto/have
else
echo " big endianess"
echo " big endian"
fi

rm $NGX_AUTOTEST*
@@ -40,6 +40,6 @@ else
rm $NGX_AUTOTEST*

echo
echo "$0: error: can not detect system endianess"
echo "$0: error: cannot detect system byte ordering"
exit 1
fi
2 changes: 1 addition & 1 deletion auto/install
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ if [ $USE_PERL = YES ]; then
cat << END >> $NGX_MAKEFILE

install_perl_modules:
cd $NGX_OBJS/src/http/modules/perl && make install
cd $NGX_OBJS/src/http/modules/perl && \$(MAKE) install
END

NGX_INSTALL_PERL_MODULES=install_perl_modules
19 changes: 17 additions & 2 deletions auto/lib/geoip/conf
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
ngx_feature="GeoIP library"
ngx_feature_name=
ngx_feature_run=no
ngx_feature_incs=
ngx_feature_incs="#include <GeoIP.h>"
ngx_feature_path=
ngx_feature_libs="-lGeoIP"
ngx_feature_test="GeoIP_open(NULL, 0)"
@@ -18,6 +18,7 @@ if [ $ngx_found = no ]; then
# FreeBSD port

ngx_feature="GeoIP library in /usr/local/"
ngx_feature_path="/usr/local/include"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lGeoIP"
@@ -34,7 +35,7 @@ if [ $ngx_found = no ]; then
# NetBSD port

ngx_feature="GeoIP library in /usr/pkg/"
ngx_feature_path="/usr/pkg/include/"
ngx_feature_path="/usr/pkg/include"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lGeoIP"
@@ -64,8 +65,22 @@ fi


if [ $ngx_found = yes ]; then

CORE_INCS="$CORE_INCS $ngx_feature_path"
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"

if [ $NGX_IPV6 = YES ]; then
ngx_feature="GeoIP IPv6 support"
ngx_feature_name="NGX_HAVE_GEOIP_V6"
ngx_feature_run=no
ngx_feature_incs="#include <stdio.h>
#include <GeoIP.h>"
#ngx_feature_path=
#ngx_feature_libs=
ngx_feature_test="printf(\"%d\", GEOIP_CITY_EDITION_REV0_V6);"
. auto/feature
fi

else

cat << END
16 changes: 16 additions & 0 deletions auto/lib/google-perftools/conf
Original file line number Diff line number Diff line change
@@ -29,6 +29,22 @@ if [ $ngx_found = no ]; then
fi


if [ $ngx_found = no ]; then

# MacPorts

ngx_feature="Google perftools in /opt/local/"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lprofiler"
else
ngx_feature_libs="-L/opt/local/lib -lprofiler"
fi

. auto/feature
fi


if [ $ngx_found = yes ]; then
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"

2 changes: 1 addition & 1 deletion auto/lib/libatomic/make
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
cat << END >> $NGX_MAKEFILE

$NGX_LIBATOMIC/src/libatomic_ops.a: $NGX_LIBATOMIC/Makefile
cd $NGX_LIBATOMIC && make
cd $NGX_LIBATOMIC && \$(MAKE)

$NGX_LIBATOMIC/Makefile: $NGX_MAKEFILE
cd $NGX_LIBATOMIC && ./configure
2 changes: 1 addition & 1 deletion auto/lib/libgd/conf
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ if [ $ngx_found = no ]; then
# NetBSD port

ngx_feature="GD library in /usr/pkg/"
ngx_feature_path="/usr/pkg/include/"
ngx_feature_path="/usr/pkg/include"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lgd"
1 change: 1 addition & 0 deletions auto/lib/pcre/conf
Original file line number Diff line number Diff line change
@@ -172,6 +172,7 @@ else
ngx_feature="PCRE JIT support"
ngx_feature_name="NGX_HAVE_PCRE_JIT"
ngx_feature_test="int jit = 0;
pcre_free_study(NULL);
pcre_config(PCRE_CONFIG_JIT, &jit);
if (jit != 1) return 1;"
. auto/feature
Loading