diff options
author | Micah Chalmer <micah@micahchalmer.net> | 2013-06-06 23:03:36 -0400 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-06-07 09:16:57 +0000 |
commit | 56b0c0c3d26304beeef54d8fe95bead97424f147 (patch) | |
tree | fafd4255bcdb39fc8c3f6482174aad77029e1134 /t/fails-rack-lint.ru | |
parent | 421f5a8573484b1203fceebc65aee5d011d63c63 (diff) | |
download | unicorn-56b0c0c3d26304beeef54d8fe95bead97424f147.tar.gz |
This fixes the -N (a.k.a. --no-defaut-middleware) option, which was not working. The problem was that Unicorn::Configurator::RACKUP is cleared before the lambda returned by Unicorn.builder is run, which means that checking whether the :no_default_middleware option was set from the lambda could not detect anything. This patch copies it to a local variable that won't get clobbered, restoring the feature. [ew: squashed test commit into the fix, whitespace fixes] Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 't/fails-rack-lint.ru')
-rw-r--r-- | t/fails-rack-lint.ru | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/t/fails-rack-lint.ru b/t/fails-rack-lint.ru new file mode 100644 index 0000000..82bfb5f --- /dev/null +++ b/t/fails-rack-lint.ru @@ -0,0 +1,5 @@ +# This rack app returns an invalid status code, which will cause +# Rack::Lint to throw an exception if it is present. This +# is used to check whether Rack::Lint is in the stack or not. + +run lambda {|env| return [42, {}, ["Rack::Lint wasn't there if you see this"]]} |