Store HTTP header name-value pairs direcly to a string and allow duplicated entries on some names.
Add key: value pair to the headers. Ignore if already sent and no duplicates are allowed for this key.
# File lib/thin/headers.rb, line 16 def []=(key, value) downcase_key = key.downcase if !@sent.has_key?(downcase_key) || ALLOWED_DUPLICATES.include?(downcase_key) @sent[downcase_key] = true value = case value when Time value.httpdate when NilClass return else value.to_s end @out << HEADER_FORMAT % [key, value] end end
Generated with the Darkfish Rdoc Generator 2.