From ec3ac2e4291026a3ebf687d7d0c45c34acac111e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 29 Jun 2009 18:21:52 -0700 Subject: [PATCH] http_request: force BUFFER to be Encoding::BINARY Not sure why this hasn't been an issue yet, but better safe than sorry with data integrity... --- lib/unicorn/http_request.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index b2c72f36..136345f8 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 -- 2.11.4.GIT