U:RDoc::AnyMethod[iI"out:EFI" CGI#out;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Print an HTTP header and body to $DEFAULT_OUTPUT ($>);To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+content_type_string+;T; [o; ; [I"AIf a string is passed, it is assumed to be the content type.;To;;[I"+headers_hash+;T; [o; ; [I"EThis is a Hash of headers, similar to that used by #http_header.;To;;[I" +block+;T; [o; ; [I"IA block is required and should evaluate to the body of the response.;T@o; ; [I"JContent-Length is automatically calculated from the size of ;TI".the String returned by the content block.;T@o; ; [I"GIf ENV['REQUEST_METHOD'] == "HEAD", then only the header ;TI"His output (the content block is still required, but it is ignored).;T@o; ; [I"IIf the charset is "iso-2022-jp" or "euc-jp" or "shift_jis" then the ;TI"Kcontent is converted to this charset, and the language is set to "ja".;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [,I"cgi = CGI.new ;TI"cgi.out{ "string" } ;TI"! # Content-Type: text/html ;TI" # Content-Length: 6 ;TI" # ;TI" # string ;TI" ;TI"(cgi.out("text/plain") { "string" } ;TI"" # Content-Type: text/plain ;TI" # Content-Length: 6 ;TI" # ;TI" # string ;TI" ;TI"#cgi.out("nph" => true, ;TI"2 "status" => "OK", # == "200 OK" ;TI"5 "server" => ENV['SERVER_SOFTWARE'], ;TI"& "connection" => "close", ;TI"* "type" => "text/html", ;TI", "charset" => "iso-2022-jp", ;TI"> # Content-Type: text/html; charset=iso-2022-jp ;TI"# "language" => "ja", ;TI": "expires" => Time.now + (3600 * 24 * 30), ;TI"1 "cookie" => [cookie1, cookie2], ;TI") "my_header1" => "my_value", ;TI"6 "my_header2" => "my_value") { "string" } ;TI" # HTTP/1.1 200 OK ;TI". # Date: Sun, 15 May 2011 17:35:54 GMT ;TI" # Server: Apache 2.2.0 ;TI" # Connection: close ;TI"7 # Content-Type: text/html; charset=iso-2022-jp ;TI" # Content-Length: 6 ;TI" # Content-Language: ja ;TI"1 # Expires: Tue, 14 Jun 2011 17:35:54 GMT ;TI" # Set-Cookie: foo ;TI" # Set-Cookie: bar ;TI" # my_header1: my_value ;TI" # my_header2: my_value ;TI" # ;TI" # string;T: @format0: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below0I"Dcgi.out(content_type_string='text/html') cgi.out(headers_hash) ;TI";T[I"(options = "text/html");T@^FI"CGI;TcRDoc::NormalClass00