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