about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-06-29 18:21:52 -0700
committerEric Wong <normalperson@yhbt.net>2009-06-29 18:21:52 -0700
commitec3ac2e4291026a3ebf687d7d0c45c34acac111e (patch)
treeac1ab90e301d1473e47e84ab6f3a5a81ab62fc25
parent41f6f65a6cb7152b5181704373d7da62704a62e8 (diff)
downloadunicorn-ec3ac2e4291026a3ebf687d7d0c45c34acac111e.tar.gz
Not sure why this hasn't been an issue yet, but better
safe than sorry with data integrity...
-rw-r--r--lib/unicorn/http_request.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb
index b2c72f3..136345f 100644
--- a/lib/unicorn/http_request.rb
+++ b/lib/unicorn/http_request.rb
@@ -27,6 +27,7 @@ module Unicorn
     # Being explicitly single-threaded, we have certain advantages in
     # not having to worry about variables being clobbered :)
     BUFFER = ' ' * Const::CHUNK_SIZE # initial size, may grow
+    BUFFER.force_encoding(Encoding::BINARY) if Z.respond_to?(:force_encoding)
     PARSER = HttpParser.new
     PARAMS = Hash.new