about summary refs log tree commit homepage
path: root/lib/mongrel.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mongrel.rb')
-rw-r--r--lib/mongrel.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/mongrel.rb b/lib/mongrel.rb
index 7c6b406..4a7e352 100644
--- a/lib/mongrel.rb
+++ b/lib/mongrel.rb
@@ -125,7 +125,7 @@ module Mongrel
     REQUEST_URI='REQUEST_URI'.freeze
     REQUEST_PATH='REQUEST_PATH'.freeze
 
-    MONGREL_VERSION="0.3.19".freeze
+    MONGREL_VERSION="0.3.20".freeze
 
     MONGREL_TMP_BASE="mongrel".freeze
 
@@ -336,15 +336,18 @@ module Mongrel
   # semantics for Hash (where doing an insert replaces) is not there.
   class HeaderOut
     attr_reader :out
+    attr_accessor :allowed_duplicates
 
     def initialize(out)
       @sent = {}
+      @allowed_duplicates = {"Set-Cookie" => true, "Set-Cookie2" => true,
+        "Warning" => true, "WWW-Authenticate" => true}
       @out = out
     end
 
     # Simply writes "#{key}: #{value}" to an output buffer.
     def[]=(key,value)
-      if not @sent.has_key?(key)
+      if not @sent.has_key?(key) or @allowed_duplicates.has_key?(key)
         @sent[key] = true
         @out.write(Const::HEADER_FORMAT % [key, value])
       end