Date: 2012-06-25 15:30:17 +0000 (Mon, 25 Jun 2012)
New Revision: 4700
Incorrect tag release-1.2.1 removed.
Changes to misc/GNUmakefile was missed during stable-1.2 branch
creation, resulting in tag set on trunk, not on branch.
Reported by Marcel Gmuer.
I have a usecase for a server rewrite, what I essentially want to do
is have a common domain like common.faskiri.com serve some contents
for specific domains like zone1.com, zone2.com etc. for some specific
common.faskiri.com/zone1/asset should basically be rewritten to
zone1/asset. Now zone1 has its own server section with /asset
I tried using rewrite module and realized it doesnt seem to handle the
usecase I have.
I created a plugin with NGX_HTTP_SERVER_REWRITE_PHASE expecting that
if I rewrite request.headers_in.server here, nginx would set the
srv_conf to zone1 and evaluate location config accordingly. But this
doesnt seem to work either, nginx seems to handle these cases with a
301 redirect instead.
For now I have configured my system to not use common.faskiri.com and
instead have common.zone1.com which uses the same set of location
config as zone1.com however what I failed to understand was, why is
server rewriting not allowed, or if it is allowed, how do I use it.
Thank you for your patience
I've just uploaded Test::Nginx 0.20 to CPAN:
It will appear on the CPAN mirror near you in the next few hours or so.
Special thanks go to all our contributors and users :)
Here's the complete change log for this release (compared to the last
CPAN release, 0.19):
* 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.
This Perl module provides a test scaffold based on IO::Socket or LWP
for automated testing in Nginx C module or ngx_lua-based Lua library
This class inherits from Test::Base, thus bringing all its declarative
power to the Nginx C module testing practices.
Please check out the full documentation on CPAN:
All of our Nginx modules (as well as our lua-resty-* libraries) are
using Test::Nginx to drive their test suites.
Please note that this module is completely different from the
Test::Nginx module created by Maxim Dounin.