Skip to content

Commit 76bf466

Browse files
committed
remove unused middleware from unicorn
unicorn by default will load a stack of middleware, including a standard rack layer for chunked responses. This gets in the way of streamed responses, which don't operate with the syntax of Transfer-Encoding: chunked. Unless it is required later on, disable the middleware layer here. Signed-off-by: Dominik Richter <[email protected]>
1 parent 54a8511 commit 76bf466

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def with_unicorn(name, unix_socket='/tmp/unicorn.sock')
267267
unless RUBY_PLATFORM == 'java'
268268
GC.disable if RUBY_VERSION < '1.9'
269269
destination = (unix_socket.nil?) ? "127.0.0.1:9292" : "unix://#{unix_socket}"
270-
pid, w, r, e = Open4.popen4("unicorn", "-l", destination, rackup_path(name))
270+
pid, w, r, e = Open4.popen4("unicorn", "--no-default-middleware","-l", destination, rackup_path(name))
271271
until e.gets =~ /worker=0 ready/; end
272272
else
273273
# need to find suitable server for jruby

0 commit comments

Comments
 (0)