69: def header(options = "text/html")
70:
71: if options.class == String
72: @head['Content-Type'] = options unless @head['Content-Type']
73: else
74:
75: @head['Content-Type'] = options['type'] || "text/html"
76: @head['Content-Type'] += "; charset=" + options['charset'] if options.has_key? "charset" if options['charset']
77:
78:
79: @head['Date'] = CGI::rfc1123_date(Time.now) if options['nph']
80:
81:
82: @head['Server'] = options['server'] || env_table['SERVER_SOFTWARE']
83:
84:
85: @head['Status'] = options['status'] if options['status']
86: @head['Content-Language'] = options['language'] if options['language']
87: @head['Expires'] = options['expires'] if options['expires']
88:
89:
90: REMOVED_KEYS.each {|k| options.delete(k) }
91:
92:
93:
94: options.each{|k,v| @head[k] = v}
95: end
96:
97:
98:
99: ""
100: end