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