Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v1_8_7_330) is shown here.
These similar methods exist in v1_9_3_392:
header(*options)
public
Show source
def CGI::header(*options)
if defined?(MOD_RUBY)
options.each{|option|
option.sub(/(.*?): (.*)/){
Apache::request.headers_out[$1] = $2
}
}
Apache::request.send_http_header
''
else
if options.delete("nph") or (ENV['SERVER_SOFTWARE'] =~ /IIS/)
[(ENV['SERVER_PROTOCOL'] or "HTTP/1.0") + " 200 OK",
"Date: " + rfc1123_date(Time.now),
"Server: " + (ENV['SERVER_SOFTWARE'] or ""),
"Connection: close"] +
(options.empty? ? ["Content-Type: text/html"] : options)
else
options.empty? ? ["Content-Type: text/html"] : options
end.join(EOL) + EOL + EOL
end
end