diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-01-08 20:28:15 +1300 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-01-08 20:28:15 +1300 |
commit | 126a3800ec37f50ed017a56b6bdab4d15fc78a75 (patch) | |
tree | 82d6f043a8cb219f9d0ef9120302a4177d14c243 | |
parent | b93ae089ac201bd2397233e75687b1a7dec60fbf (diff) | |
download | rack-126a3800ec37f50ed017a56b6bdab4d15fc78a75.tar.gz |
Don't propagate nil values.response-body-compact
Some middleware is generating `[nil]` bodies. Previous implementation would
filter these. So, we reproduce this behaviour when buffering the body.
-rw-r--r-- | lib/rack/response.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rack/response.rb b/lib/rack/response.rb index ab94a4e3..5c8dbab9 100644 --- a/lib/rack/response.rb +++ b/lib/rack/response.rb @@ -227,7 +227,7 @@ module Rack if @body.is_a?(Array) # The user supplied body was an array: - @body = @body.dup + @body = @body.compact else # Turn the user supplied body into a buffered array: body = @body |