Changes for Test::Nginx

0.30 - 2022-05-13

 *   bugfix: reserved ports for stream_server_config.

 *   feature: expanded environment values in --- tcp_listen section.

 *   bugfix: user name with dash was not allowed, eg like 'www-data'. thanks
     lijunlong for the patch.

 *   bugfix: there can be trailing spaces in HTTP 0.9.

 *   feature: add TEST_NGINX_FAST_SHUTDOWN to stop Nginx without graceful.
     thanks spacewander for the patch.

 *   bugfix: supported to parse http trailer in response body. thanks Yuansheng
     for the patch.

 *   change: quic use keepalive_timeout instead of quic_max_idle_timeout now.
     thanks lijunlong for the patch.

 *   bugfix: did not skip test cases that proxy_pass or directly connect to
     request server port. thanks lijunlong for the patch.

 *   bugfix: should not change config line number for old test cases.
     thanks lijunlong for the patch.

 *   bugfix: curl request was sent before nginx startup when running in valgrind
     mode. thanks lijunlong for the patch.

 *   bugifx: waitpid failed when the process is not subprocess of perl. thanks
     lijunlong for the patch.

 *   bugfix: nginx reload hangs when http3 is enabled. thanks lijunlong for the
     patch.

 *   feature: support HTTP/3 testing. thanks lijunlong for the patch.

 *   feature: added new section "--- no_access_log" which could be used to
     specify patterns of lines that do not appear in access.log at all.
     thanks levy001 for the patch.

 *   bugfix: allow capture OpenSSL version without letter. thanks Wangchong Zhou
     for the patch.

 *   feature: check if grep_error_log is defined when grep_error_log_out exists.
     thanks spacewander for the patch.

 *   feature: add '--- curl_options' and '--- curl_protocol' section.
     thanks woodgear for the patch.

 *   feature: added file name to name of the test case. thanks lijunlong for
     the patch.

 *   feature: support FIRST to mark the beginning of test. thanks spacewander
     for the patch.

 *   bugfix: perl did not exit when kill process with SIGKILL. thanks lijunlong
     for the patch.

0.29 - 2020-11-06

 *   bugfix: check leak mode: use much larger number of requests for
     ab/weighttp to make sure we always have the load even for large
     TEST_NGINX_CHECK_LEAK_COUNT values.

 *   feature: added TEST_NGINX_RAND_PORT_XXX variable to provide random ports
     during environment variable expansion. thanks Johnny for the patch.

 *   bugfix: log correct server address when server_addr_for_client section
     is used. thanks Patrick Thiel for the patch.

0.28 - 2020-07-13

 *   bugfix: we downgraded the bundled version of Test::Builder to avoid the
     extra dependency Test2::Util.

0.27 - 2020-07-02

 *   feature: added the --- reload_fails new section to skip checking
     config_version after HUP reload in the HUp reload testing mode.

 *   feature: added a "--- gen_dgram_request" section.

 *   feature: relaxed the Server response header parsing pattern for
     extracting the nginx core verison number.

 *   bugfix: when --- reload_fails is specified, we did not assume ---
     no_chck_leak since it would always fail in the check leak testing mode.

 *   feature: implemented the `--- shutdown_error_log` section for
     checking the error logs generated during nginx exit.

 *   feature: added new test mode enabled by the env TEST_NGINX_USE_HTTP2=1
     and new section "--- http2", for enabling the HTTP/2 protocol to
     send the test request.

 *   bugfix: when TEST_NGINX_USE_STAP=1 env was specified, the master process
     would be turned off when for test blocks without actually using --- stap.

 *   feature: be more patient to wait for the nginx to start up in profiling
     and "check leak" test mode.

 *   optimize: use perl's own remove_tree() instead of the shell command
     'rm  -rf' since the latter may use too much memory.

 *   feature: added support for the env TEST_NGINX_CHECK_LEAK_COUNT to control
     how many data points to sample in the "check leak" test mode.

 *   feature: now we pass through the MOCKNOEAGAIN_VERBOSE and MOCKNOEAGAIN
     env to the nginx worker processes by default as well.

 *   feature: added support for TEST_NGINX_WORKER_USER env for setting the user
     account (and user group) for nginx worker processes; defaults to root when
     the master is run by root.

 *   bugfix: the value of env TEST_NGINX_WORKER_USER did not accept a single
     user name (without a user group name).

 *   feature: added support for the --- access_log section for checking access
     log file content.

 *   bugfix: valgrind test mode: we no longer disable nginx master process in
     this mode.

 *   bugfix: we did not clean up nginx's *_cache directories under the server
     root directory.

 *   feature: added support for environment variable TEST_NGINX_REUSE_PORT for
     enabling the reuseport parameter in the listen directive automatically
     generated in nginx.conf.

 *   feature: we now check for the new "write guard" warning message to detect
     misuses of lua globals.

 *   feature: added the use_hup() Perl utility function.

 *   feature: when --- no_error_log fails, we output up to 9 lines of
     subsequent error log messages for better debuggability (for example,
      wen can have complete lua backtraces).

 *   feature: expanded environment values in --- user_files section.

 *   bugfix: when setting TEST_NGINX_USE_HUP=1, some directories could not be
     cleaned up correctly.

 *   feature: implemented the TEST_NGINX_USE_RR=1 env for enabling Mozilla rr
     to record the nginx server execution.

 *   bugfix: increased resiliency in HUP reload mode.

 *   feature: added the '--- skip_openssl' section to skip tests depending on
     the OpenSSL version NGINX was built with.

 *   bugfix: ensured we do not remove some files when using HUP mode.

 *   bugfix: properly use a concat operator instead of a range.

 *   bugfix: ensure servroot is cleaned up when starting NGINX for the first
     time.

0.26 - 2017-04-09

 *   feature: added new Test::Nginx::Socket::Lua::Dgram module for
     testing UDP/datagram nginx servers.

 *   feature: added new section, `--- response_body_filters`, to
     allow custom value filters applied upon the *actual* response
     body data before matching against the expected values. thanks
     detailyang for the patch.

 *   feature: added support for env TEST_NGINX_RANDOMIZE, which when
     set allows parallel testing.

 *   feature: added support for the `$TEST_NGINX_SERVER_ROOT` special
     macro variable in test block specs.

 *   feature: allows extracting nginx version numbers from more
     forked versions of nginx.

 *   feature: support the "SKIP" section dynamically defined by
     subclasses of the test scaffold calsses.

 *   feature: `--- tcp_reply` section: allows perl subroutines as
     section values. thanks Robert Paprocki for the patch.

 *   bugfix: fixed the TEST_NGINX_BINARY environment for specifying
     nginx binary path. thanks Thibault Charbonnier for the patch.

 *   bugfix: ensure that kill_process() still kills the process with
     force if the process is still running after sending SIGQUIT.

 *   improve: improved the nginx shut down logic. thanks Dejiang Zhu
     for the suggestion.

 *   improve: improved the test message for ARRAY-typed
     "response_body" section values.

 *   improve: improved the dry run skip message for no_error_log.

 *   doc: typo fixes from Juntong Fu.

0.25 - 2016-02-24

 *   feature: added the new test mdoule, Test::Nginx::Socket::Lua::Stream,
     for testing stream-typed NGINX C modules like ngx_stream_echo_module
     and ngx_stream_lua_module.

 *   feature: added new section "--- server_addr_for_client" to control
     the value of server_addr for client. thanks Guanlan Dai for the patch.

 *   feature: added support for the TEST_NGINX_LOAD_MODULES environment for
     loading dynamic NGINX modules in nginx.conf globally.

 *   feature: added support for ASAN by passing ASAN_OPTIONS environment
     variable. thanks Markus Linnala for the patch.

 *   feature: Test::Nginx::Socket::Lua: added support for
     the init_by_lua_block {} directive of ngx_http_lua_module.

 *   feature: avoided variations in the absolute line numbers of user
     configurations so that the test cases can check nginx configuration
     file line numbers deterministically.

 *   feature: implemented the env_to_nginx() Perl utility function as per
     Rollin Crittendon's request. for example:
     env_to_nginx('foo', 'bar=hello world')

 *   feature: now we pass the environment DYLD_FORCE_FLAT_NAMESPACE to the
     nginx by default as well.

 *   feature: implemented the "--- todo" section for TODOing test blocks.
     thanks Markus Linnala for the patch.

 *   feature: repeat_each() also returns the value even when it is used as
     a setter.

 *   bugfix: testing could not continue properly when the "--- must_die"
     subtest failed.

 *   bugfix: ARRAY-typed "--- more_headers" now work with ARRAY-typed
     "--- request". thanks Kipras Mancevičius for the report.

 *   bugfix: fixed the perl warning "Use of uninitialized value $val in
     concatenation" when "--- more_headers" has headers without values.

 *   bugfix: use SIGTERM to kill non-responsive nginx/valgrind processes
     instead of SIGQUIT; otherwise the perl test process may hang forever
     in valgrind testing mode.

 *   bugfix: only complain about failures of removing the nginx pid file
     when it still exists.

 *   bugfix: we should bail out when `nginx -V` returns anything that we
     cannot understand.

 *   bugfix: builtin udp server: fixed recv() call's error handling.

 *   bugfix: we did not expand environments TEST_NGINX_XXX in the
     "--- main_config" and "--- post_main_config" data sections.

 *   bugfix: better error handling in the mocked UDP server.

 *   change: changed the default value of TEST_NGINX_SLEEP to 0.015 (sec).
     thanks Dejiang Zhu for the patch.

 *   improvement: output the system error message when failing to remove
     the nginx pid file.

 *   improvement: made the error_log test failure message clearer. thanks
     Nick Muerdter for the patch.

 *   doc: fixed the module description of Test::Nginx and
     Test::Nginx::Socket to reflect recent changes.

 *   doc: now we highly recommend Test::Nginx::Socket and its subclasses.

 *   doc: documentged the default timeout value used by the client. thanks
     Nick Muerdter for the patch.

 *   doc: added a link to the official user guide in the book
     "Programming OpenResty".

0.24 - 2014-12-07
 *   feature: added support for the "benchmark" testing mode enabled
     by the TEST_NGINX_BENCHMARK environment variable.

 *   feature: added support for the TEST_NGINX_BENCHMARK_WARMUP
     environment to specify the number of warm-up requests before the
     actual benchmark testing.

 *   feature: added support for the "--- curl" section that generates
     a "curl" command line for the corresponding test request.

 *   feature: added new section "--- server_name" to control the
     value of the server_name nginx config directive used for the
     default server {}.

 *   feature: added new section "--- error_log_file".

 *   feature: automatically print out warnings for [emerg] messages
     in nginx's error.log to stderr if it is not mentioned in "---
     error_log" nor "--- no_error_log".

 *   feature: Test::Nginx::Socket: "--- request" now supports leading
     comment lines prefixed by "#".

 *   feature: the "--- user_files" section supports raw Perl data
     structures for specifying the user files.

 *   feature: the "--- more_headers" section now supports perl
     array-ref typed values for pipelined requests.

 *   feature: exported the "add_response_body_check" and "is_str"
     utility functions.

 *   feature: the "--- udp_reply" section now accepts a Perl
     subroutine as its value which can be used to generate dynamic
     replies based on the actual query. thanks blablacio for the
     original patch.

 *   feature: Test::Nginx::Socket: exported new Perl utility
     functions "add_cleanup_handler", "add_block_preprocessor", and
     "bail_out".

 *   feature: made the special $LIBxxx_PATH variable more general in
     the "--- stap" section.

 *   feature: the "--- no_error_log" section now tries to find all
     the matched lines in error logs instead of stopping on the first
     hit.

 *   feature: added new section "--- tcp_shutdown" for shutting down
     read, write, or both parts of the connection in the embedded TCP
     server immedately after the connection is established.

 *   feature: the value of "--- tcp_query_len" now defaults to the
     lenghth of the value of "--- tcp_query" (if any).

 *   feature: added new section "--- must_die" for testing the cases
     that nginx fail to start (like invalid nginx configurations and
     etc). thanks Markus Linnala for the patch.

 *   bugfix: when user specifies "Host" and "Connection" in "---
     more_headers", then we should not add our own Host request
     headers.

 *   bugfix: made the default value of the "Connection" request
     header to be "close" instead of "Close".

 *   bugfix: the "check leak" testing mode might send a bogus request
     header via ab or weighttp.

 *   bugfix: we should also wait for the time specified by the "---
     abort" section before checking error logs for the repeated
     requests that are not the last one.

 *   optimize disabled accept_mutex by default in the auto-generated
     nginx.conf.

 *   bugfix: "--- skip_nginx" and "--- skip_nginx2" did not skip
     tests related to the mocked TCP and UDP servers.

 *   bugfix: we did not automatically remove the .stp and .stp-out
     temp files created by the "--- stap" sections in the systemtap
     testing mode.

 *   bugfix: "--- request" did not provide the guilty request line
     that it failed to parse.

 *   bugfix: Test::Nginx::Socket: "--- error_code" might take bad
     values.

 *   bugfix: we incorrectly discarded all the query data read in the
     mocked TCP server when timeout errors happen (due to the actual
     query is shorter than the expected data specified "---
     tcp_query", for example).

 *   bugfix: the "check leak" testing mode could not parse raw HTTP
     requests using LF instead of CRLF for line terminators.

 *   doc: documented the section "--- init".

 *   doc: added info for the openresty and openresty-en mailing lists
     for discussions.

 *   doc: spelling fixes from Markus Linnala.

0.23 - 2014-04-05
 *   feature: added new section --- response_body_unlike. thanks
     Rickey Visinski for the patch.

 *   feature: allow use of the $ServerPort and $ServerPortForClient
     variables in "--- response_headers".

 *   feature: now we automatically kill the process listening on the
     mocked TCP port when we have tried for more than 20 times.

 *   feature: added new section "--- http09" to Test::Nginx::Socket
     to indicate use of HTTP 0.9 requests.

 *   feature: added support for the $LIBLUA_PATH variable in "---
     stap", which evaluates to the absolute path of the liblua*.so
     DSO loaded by the nginx server.

 *   feature: we skipped reading the response body for 101 responses.

 *   feature: added new section "--- post_main_config" to add custom
     top-level configuration snippets right after the http {} block
     generated by Test::Nginx.

 *   feature: added unix domain socket support for tcp_listen. thanks
     Jiale Zhi for the patch.

 *   feature: added new sections "--- grep_error_log" and "---
     grep_error_log_out".

 *   feature: added utility function check_accum_error_log for
     checking the accumulated error logs in "--- error_log" and "---
     no_error_log".

 *   feature: added utility Perl function server_port_for_client.
     thanks doujiang for the patch.

 *   feature: added configuration Perl function server_name(). thanks
     doujiang for the original patch.

 *   feature: added new module Test::Nginx::Socket::Lua.

 *   feature: automatically test if there is any assertion failures
     in the nginx error logs.

 *   feature: when nginx process is gone unexpectedly, we
     automatically tail the nginx error log file.

 *   feature: added the "--- no_check_leak" section to skip test
     blocks in the "check leak" testing mode.

 *   feature: "--- no_error_log" accepts a single Perl Regexp object
     now, just like "--- error_log".

 *   bugfix: Test::Nginx::Socket tried to read response bodies for
     304 responses.

 *   bugfix: we did not try hard enough before killing the nginx
     process by force.

 *   bugfix: improved the error handling when recv() fails on the
     HTTP connection.

 *   bugfix: subtests for "--- tcp_query", "--- tcp_query_len", and
     "--- udp_query" disabled test plan checks.

 *   bugfix: we did not pass the LD_LIBRARY_PATH environment to nginx
     when systemtap is used.

 *   bugfix: "--- error_log" should work on each test request's own
     logs only.

 *   bugfix: server address should default to 127.0.0.1 instead of
     "localhost".

 *   bugfix: made the test skip messages better.

 *   change: removed "env LUA_PATH" and "env LUA_CPATH" from the
     default nginx configuration generated.

 *   change: set --num-callers=100 to valgrind by default.

 *   doc: Test::Nginx::Socket: documented the various exported Perl
     functions like "run_tests", "repeat_each", and "no_shuffle".

0.22 - 2013-06-10
 *   feature: added new sections --- abort and --- shutdown to test
     premature client abortions.

 *   feature: implemented new section "---
     raw_response_headers_unlike".

 *   feature: added support for custom http_config filters for
     subclasses.

 *   feature: now we automatically check [alert] and [crit] messages
     in the nginx error logs and print them as warnings if they do
     not appear in either --- error_log or --- no_error_log.

 *   feature: added new section "--- stap_out_unlike" for testing
     patterns which should not appear in the output systemtap.

 *   feature: added support for the special notation "$LIBPCRE_PATH"
     within --- stap, which is always substituted by the absolute
     path to libpcre used by the current nginx.

 *   feature: now we check if the nginx process is gone in the "check
     leak" testing mode (i.e., when TEST_NGINX_CHECK_LEAK=1).

 *   feature: added new section "--- skip_eval: <subtest-count>
     <perl-code>" for skipping tests according to the running result
     of a piece of Perl code.

 *   feature: now we allow a (unix domain) socket file path specified
     in the "--- udp_listen" directive value.

 *   feature: in --- stap values, now we support the notation
     "F(func@file)".

 *   feature: made the environment TEST_NGINX_SERVER_PORT always take
     the value so that the test cases can always reference it.

 *   feature: added new section "--- wait" to always wait a specified
     amount of time before checking the systemtap outputs and/or
     error logs (if any).

 *   bugfix: no longer retry connecting to the nginx server when the
     child process running nginx is already gone.

 *   bugfix: no longer bail out the up to 3 test cases fail all their
     connecting attempts.

 *   bugfix: TEST_NGINX_USE_HUP=1 could not work with
     TEST_NGINX_NO_CLEAN=1.

 *   bugfix: the output of systemtap took the value undef when it was
     in fact empty.

 *   bugfix: protect against division by zero in the "check leak"
     testing mode.

 *   bugfix: disabled the test report ending when failing to parse
     chunked response body because the test count is surely out of
     sync.

 *   bugfix: the code that searches executables in the PATH
     environment would always look up the current working directory
     first and might pick up an executable directory with the same
     name.

 *   bugfix: conflicting testing modes may conflict together.

 *   bugfix: added File::Path 2.06_05 as a minimum requirement.
     thanks Andreas J. König for reporting this issue.

 *   bugfix: pass --show-possibly-lost=no to valgrind by default
     because nginx makes clever use of pointers almost everywhere.

 *   bugfix: when --- abort was not specified, http client timeout
     was not treated as a subtest failure as specified.

 *   bugfix: the child process running ab or weighttp might not be
     reaped in extreme conditions.

 *   bugfix: we did not close STDOUT and STDERR in the child
     processes forked, which could confuse the "prove" harness and
     lead to hang.

 *   optimize: disabled the access log altogether in the "check leak"
     testing mode.

 *   docs: documented the TEST_NGINX_NO_CLEAN environment.

 *   docs: fixed a small issue in the code sample. thanks smallfish.

0.21 - 2012-09-27
 *   feature: added support for SystemTap: the SystemTap white-box
     testing mode is enabled by setting TEST_NGINX_USE_STAP=1 and by
     using new test sections "--- stap", "--- stap_out", and "---
     stap_out_like".

 *   feature: added support for new sections "--- udp_listen" and
     "--- udp_reply" for mocking an internal UDP server.

 *   feature: added new section "--- udp_reply_delay" and also make
     "--- udp_reply_delay" and "--- timeout" sections accept time
     values with a time unit which can be either "s" or "ms".

 *   feature: added new section "--- udp_query" to test if the UDP
     query sent to the embeded UDP server is expected.

 *   feature: added new section "--- tcp_query_len" to work with
     mockeagain testing modes.

 *   feature: added support for embedded TCP server by introducing
     new sections "--- tcp_listen", "--- tcp_query", "--- tcp_reply",
     and "--- tcp_reply_delay".

 *   feature: added new section "--- tcp_no_close" to tell the
     embedded TCP server (if any) never close the connection
     actively. this is feature is mainly for mocking upstream reply
     read time out in the middle.

 *   feature: added new section "--- log_level" to specify the error
     log level on a test-by-test basis.

 *   bugfix: we might lose logs at config-time when
     TEST_NGINX_USE_HUP=1 because we sent HUP before USR1.

 *   bugfix: be more tolarent when removing the nginx pid file while
     the nginx process is not running.

 *   optimize: now we can automatically check the version of the
     current nginx configuration and retry dozens of times when
     TEST_NGINX_USE_HUP=1. this speed up the test suite in this mode
     a lot and also avoid accidental failures due to slow nginx
     reloads.

 *   bugfix: try harder when failing to connect to the Nginx server.

 *   refactor: now we use the standard "return" directive instead of
     "echo" for detecting nginx config reload completion for the "HUP
     reload" testing mode.

 *   refactor: use waitpid() wherever possible.

 *   bugfix: Parallel::ForkManager does not allow the user calling
     waitpid directly, or inifinite looping might happen when calling
     its start() method. now we no longer use this module any more
     and use the fork() builtin function exclusively.

 *   bugfix: disabled the ending output "Looks like you ..." when the
     client socket timed out.

 *   refactor: now we disabled the access log by default.

 *   updated the bundled versions of Test::Builder and Test::More
     modules.

 *   docs: documented the "--- skip_nginx" and "--- skip_nginx2"
     sections. thanks Weibin Yao for requesting it.

0.20 - 2012-06-25
* feature: now "--- error_log" allows a single regexp object as its value.

* feature: made client socket timeout as a test failure.

* feature: added support for the environment TEST_NGINX_CHECK_LEAK=1
  that enables the most general memory leak check by calling
  ab/weighttp + ps (for the nginx process's RSS).

* feature: when the TEST_NGINX_USE_HUP environment is set to true,
  then HUP signal will be used to update the nginx config between
  different test blocks and there will be no HUP reload between
  every two successive test cases within the same test block when
  "repeat_each" is set to a number more than 1.

* bugfix: fixed the TEST_NGINX_SLEEP environment support.

* bugfix: we should always restore user files before each
  "repeat_each" iteration because some test case may modify
  the user files.

* bugfix: setting environment TEST_NGINX_USE_HUP could not work
  with TEST_NGINX_USE_VALGRIND=1 properly.

* bugfix: print out every test block's name when
  TEST_NGINX_USE_HUP=1 and TEST_NGINX_USE_VALGRIND=1.

* bugfix: the "response body truncated" warning was a false alarm
  for HEAD requests. thanks Piotr Sikora for reporting this in
  github issue #1.

* bugfix: do not add --gen-suppressions and --suppressions options
  to the valgrind command line when custom non-number
  TEST_NGINX_USE_VALGRIND env value is specified.

* docs: documented the "--- timeout" section.

* docs: added a link to António P. P. Almeida's debian package for this module.

0.19 - 2012-04-29
* feature: added new section "--- error_code_like".
* bugfix: tests could hang on slow machines after maximal number of connecting
  attempts (as well as other exceptions). Now we eliminate dying directly from
  within the test scaffold. Instead, we always use Test::More::BAIL_OUT. Also,
  we always politely clean up all the forked child processes before we quit.
  Finally, we add timeout protection to the connect operation.
* bugfix: prevented blocking indefinitely on ForkManager's wait_all_children call.
  also made timeout an API provided by Test::Nginx::Util.
* feature: now we preserve environment "MOCKEAGAIN" as well.
* bugfix: the timestamps for the "--- user_files" directive should be GMT rather
  than localtime.
* feature: now section "no_error_log" also supports multi-line values to mean
  multiple literal patterns (per line).
* feature: the "--- user_files" sections now support absolute file paths and creating
  arbitrarily nested directories in the file path. thanks @penjin2012 for suggesting it.
* feature: the "--- error_log" section now supports multiple lines to mean multiple
  literal patterns.
* bugfix: fixed places that crash for bad responses.
* bugfix: fixed another crash when no response object is constructed.

0.18 - 2012-02-03
* feature: added new section "--- no_error_log" which could be used to specify
  patterns of lines that do not appear in error.log at all.
* feature: added MOCKEAGAIN_VERBOSE, DYLD_INSERT_LIBRARIES,
  MOCKEAGAIN_WRITE_TIMEOUT_PATTERN, and LD_PRELOAD to the
  environments that should be kept through nginx reload and restart.
* doc: added Naxsi and ngx_rds_csv to the user module list in the POD documentation.
* feature: now we can use the environment TEST_NGINX_USE_VALGRIND to specify the
  valgrind command-line options, when set to 1 or other non-zero numbers, it is
  effectively equivalent to the value "--tool=memcheck --leak-check=full". To
  use Valgrind SGCheck to run the tests, just specify the environment
  TEST_NGINX_USE_VALGRIND="--tool=exp-sgcheck" first.
* feature: added support for environment TEST_NGINX_VERBOSE.
* feature: added support for environment TEST_NGINX_USE_HUP.
* feature: added support for the TEST_NGINX_POSTPONE_OUTPUT environment.
* feature: now we'll retry sending the QUIT signal for at most 5 times when the
  nginx process is refusing to quit. after 5 trials, KILL signal will be sent.
* feature: exposes the "master_off" API which turns off the nginx master process.
* feature: added new section "--- ignore_response" to test bad responses.
* bugfix: Test::Nginx::Socket will retry 10 times if fail to connect because nginx
  with valgrind can be very slow to start in some systems.
* feature: added new section name "--- error_log" to test error lines. requested
  by Piotr Sikora in the last year or so.
* feature: added the TEST_NGINX_EVENT_TYPE environment to specify an event API type
  (like "epoll" or "select") when running the test suite.

0.17 - 2011-11-04
* bugfix: do not strip trailing CRCF for response headers in
  Test::Nginx::Socket's response parser.
* bugfix: fixed issues in Content-Length response header handling in case of
  pipelined reqeusts.
* bugfix: fixed the pipelined_requests section support.
* feature: added support for user file timestamp.

0.16 - 2011-07-07
* fixed a bug that length(undef) produced lots of warnings on perl 5.10.x.
  thanks Guo Ying (shrimp).
* now we automatically retry connecting for 3 times (1 sec delay)
  in Test::Nginx::Socket::send_request. this will help automatically recovering
  from random slow valgrind loading problems.
* when the directories specified in --- user_files do not exist, Test::Nginx will create it
  automatically.
* now we'll issue warning when there is extra bytes after the last chunk in the chunked response parser.

0.15 - 2011-05-23
* fixed a bug when using arrays in the "response_body" (and other similar) section when there was only one request.
* fixed presentation problems in the HTML generated from the POD.
* added documentation for the TEST_NGINX_* variables.
* added "local $?" in Test::Nginx::Util::END to avoid confusing Test::Builder::_ending()
* removed "use Test::More" from Test::Nginx::Socket because Test::Base already loads it.

0.14 - 2011-05-12
* now we require Parallel::ForkManager, Text::Diff, and Test::Base.
* the --- request section now supports multiple requests and even "packeting"
  (see documentation for details). And it should be backward compatible.
  Of course, the "expected" sections have been upgraded to expect
 (and even require) arrays in this situation.
* updated quite a bit the documentation.
* deprecated request_eval and response_body_eval. If you use them, the
  test will pass but you will be issued a "diag" statement telling you
  to move to "request eval" and "response_body eval" respectively.
* added new implementation for pipelined requests and raw requests.
  Rewrote SKIP statement to be less verbose and more in line with what
  is recommended on Test::Nginx.
* added support for environment variable TEST_NGINX_FORCE_RESTART_ON_TEST.
  Defaults to 1. Must be explicitly set to 0 to avoid restarting the nginx
  server when the config does not change between two tests.
  This also brings support for allowing config not to be set.
  This way, using TEST_NGINX_FORCE_RESTART_ON_TEST=1 with TEST_NGINX_NO_SHUFFLE=1
  and having a config section only on the first test, you can have all tests
  use the same config.
* added support for environment variable TEST_NGINX_NO_NGINX_MANAGER (defaults
    to 0) which will disable the nginx management code (stop/config/start).
    Very useful when you want to run tests on an already running NGINX (set
    TEST_NGINX_NO_NGINX_MANAGER to 1 and TEST_NGINX_CLIENT_PORT to the
    port your running nginx is listening on).

0.13 - 2011-03-08
* documented the TEST_NGINX_PORT environment.

0.12 - 2011-03-08
* documented the etcproxy and valgrind integration support.
* implemented the no_nginx_manager utility function
* documented the difference between Test::Nginx::Socket and Test::Nginx::LWP.
* allow numbers in TEST_NGINX_BLAH_BLAH_BLAH env names.
* added support for --- raw_response_headers_like.
* fixed a bug in the can_run sub.

0.11 - 2010-10-09
* add TEST_NGINX_BUILDSLAVE and --- skip_slave.
* implemented the TEST_NGINX_IGNORE_MISSING_DIRECTIVES which can
  force test cases to skip when the directive is not
  found in the current nginx.
* added support for env TEST_NGINX_TIMEOUT.
* implemented TEST_NGINX_XXX env expansion in --- config and --- http_config sections.

0.10 - 2010-08-19
* we use our own can_run function rather than Module::Install::Can's.
* added TEST_NGINX_MASTER_PROCESS, rename TEST_NGINX_ROOT to less confusing TEST_NGINX_SERVROOT and reorder priority of TEST_NGINX_{CLIENT_,SERVER_,}PORT environment options. (Piotr Sikora)
* added support for TEST_NGINX_NO_SHUFFLE env as requested by Piotr Sikora :)
* added support for TEST_NGINX_LOG_LEVEL env but it can be overriden on the script level by calling the log_level function.
* added support for TEST_NGINX_ERROR_LOG: if this env is specified to some file path, then all the error log by all the test cases will be accumulated to that file.
* Now the test script driven by Test::Nginx will tell nginx to quit by default. The TEST_NGINX_NO_CLEAN=1 env setting will give back the old behavior :) Thanks Piotr Sikora for requesting this.
* added support for --- main_config.
* Make Test::Nginx more friendly to the environment (Piotr Sikora)
    Added environment variables:
    TEST_NGINX_BINARY - full path to the nginx binary,
    TEST_NGINX_ROOT - path where server root should be created,
    TEST_NGINX_PORT - port number that should be used by client and server
                      (takes precedence over _CLIENT_PORT and _SERVER_PORT),
    TEST_NGINX_SERVER_PORT - port number that should be used by the server.
* add environment variable TEST_NGINX_SLEEP
* added support for ngx_openresty in nginx version parser.

0.09 - Wed 07 Jul 2010 02:57:13 PM CST
* added new section --- user_files which will create user files under html/.
* applied the patch from Piotr Sikora to add the --- skip_nginx2 directive.
* use the latest nginx version as the default if the version number can not be parsed from "nginx -V".
* added support for ! HEADER syntax to --- response_headers such that we can test if a response header exists.
* fixed some bugs in --- response_headers.
* now TEST_NGINX_USE_VALGRIND=1 works out of the box. one can ualso use test/valgrind.suppress file to serve as a default suppression file.
* better diagnostics for socket timeout outputs.
* added support for the --- charset section.
* use localhost as the server_name in the test nginx.conf.
* added support for the server_addr sub as well as the TEST_NGINX_CLIENT_PORT environment.
* always use Time::HiRes's sleep. this issue was reported by leicheng++.
* added new config function no_root_location as well as the new section --- init.

0.08 - Tue 26 Jan 2010 12:20:03 PM CST
* fixed a bug in the chunked parser in Test::Nginx::Socket:
  now we immediately stop reading more data chunks when
  seeing the last chunk.
* added func no_long_string to Test::Nginx::Socket and
  Test::Nginx::LWP so that we can disable
  Test::LongString in the test scaffold.
* added utility config functions "workers", "log_level", and
  "master_on" to Test::Nginx::Socket.
* added ngx_rds_json and ngx_xss modules to the module
  list that uses Test::Nginx::Socket.

0.07 - Tue 05 Jan 2010 10:06:56 AM CST
* we now use IO::Select in Test::Nginx::Socket to save CPU resources
  while polling the non-blocking socket.
* POD: added ngx_drizzle to the module list that use Test::Nginx::Socket.
* added utility config functions "worker_connections" and
  "master_process_enabled".

0.06 - Thu 24 Dec 2009 10:59:29 AM CST
* we now disable the nginx daemon mode in the config file by default.
* we now generate a default index.html page under the root /.
* added support for the new --- http_config section so that you can
  put upstream foo { ... } in it.

0.05 - Tue 22 Dec 2009 10:17:44 AM CST
* added support for gcc profiling via the
  $Nginx::Util::Profiling variable.
* fixed the chunked decoder for large chunks.

0.04 - Fri 18 Dec 2009 04:09:02 PM CST
* added new sections --- raw_request and
  --- raw_request_middle_delay to Test::Nginx::Socket.
* added new functions config_preamble and repeat which
  are exported by default.

0.03 - Tue 15 Dec 2009 11:35:07 AM CST
- refactored a lot of duplicate code between
  Test::Nginx::LWP and Test::Nginx::Socket to
  a separate module named Test::Nginx::Util.
- now Test::Nginx::Socket also restart the nginx
  server at every test case run.
- added support for --- request_eval and
  --- response_eval to Test::Nginx::Socket.

0.02 - Wed 09 Dec 2009 09:50:11 AM CST
- skipped the POD coverage tests for now.

0.01 - Tue 08 Dec 2009 11:07:51 AM CST
- initial release.