diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-01-07 20:49:59 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-01-07 20:49:59 -0800 |
commit | 3eb8dd9bd48ae031a90747210c28ece491d1017e (patch) | |
tree | 18dd7b1a6e787571f3ece7f7a97445f6c2d9e3e3 /lib/unicorn | |
parent | 19dac8e60e12036b2717cb4933e79ac9efb04d40 (diff) | |
parent | 52400de1c9e9437b5c9df899f273485f663bb5b5 (diff) | |
download | unicorn-3eb8dd9bd48ae031a90747210c28ece491d1017e.tar.gz |
* rack-1.1: http_response: disallow blank, multi-value headers local.mk.sample: use rack-1.1.0 bump "rack.version" env to [1,1] set env["rack.logger"] for applications
Diffstat (limited to 'lib/unicorn')
-rw-r--r-- | lib/unicorn/http_request.rb | 2 | ||||
-rw-r--r-- | lib/unicorn/http_response.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index 31fcc3d..99c11c2 100644 --- a/lib/unicorn/http_request.rb +++ b/lib/unicorn/http_request.rb @@ -12,7 +12,7 @@ module Unicorn "rack.multiprocess" => true, "rack.multithread" => false, "rack.run_once" => false, - "rack.version" => [1, 0], + "rack.version" => [1, 1], "SCRIPT_NAME" => "", # this is not in the Rack spec, but some apps may rely on it diff --git a/lib/unicorn/http_response.rb b/lib/unicorn/http_response.rb index 92d4d6d..96e484b 100644 --- a/lib/unicorn/http_response.rb +++ b/lib/unicorn/http_response.rb @@ -47,7 +47,8 @@ module Unicorn headers.each do |key, value| next if SKIP.include?(key.downcase) if value =~ /\n/ - out.concat(value.split(/\n/).map! { |v| "#{key}: #{v}\r\n" }) + # avoiding blank, key-only cookies with /\n+/ + out.concat(value.split(/\n+/).map! { |v| "#{key}: #{v}\r\n" }) else out << "#{key}: #{value}\r\n" end |