Permalink
Browse files

Fix compression middleware, it was wrapping the body unnecessarily in…

… an extra Array
  • Loading branch information...
1 parent 3c1783c commit c60b7e314a87f6d3a635795628402f6686ba7811 @copiousfreetime committed Jul 24, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/stickler/middleware/compression.rb
@@ -24,7 +24,8 @@ def call( env )
stream = Gem.deflate( body.first )
end
end
- return [ status, headers, [ stream ] ]
+ stream = [ stream.to_s ] unless stream.respond_to?( :each )
+ return [ status, headers, stream ]
end
end
end

0 comments on commit c60b7e3

Please sign in to comment.