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
16: def []=(key, value)
17: if !@sent.has_key?(key) || ALLOWED_DUPLICATES.include?(key)
18: @sent[key] = true
19: value = case value
20: when Time
21: value.httpdate
22: when NilClass
23: return
24: else
25: value.to_s
26: end
27: @out << HEADER_FORMAT % [key, value]
28: end
29: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.