Created
May 7, 2010 13:31
-
-
Save lsiden/393420 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/rack/chunked.rb b/lib/rack/chunked.rb | |
index dddf969..0ee8fb9 100644 | |
--- a/lib/rack/chunked.rb | |
+++ b/lib/rack/chunked.rb | |
@@ -35,7 +35,7 @@ module Rack | |
def each | |
term = "\r\n" | |
@body.each do |chunk| | |
- size = bytesize(chunk) | |
+ size = chunk.nil? ? 0 : bytesize(chunk) | |
next if size == 0 | |
yield [size.to_s(16), term, chunk, term].join | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment