るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.049秒)
トップページ > クエリ:new[x] > クエリ:plain[x] > クエリ:header[x]

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

クラス

キーワード

検索結果

ruby 1.6 feature (23372.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...00019>))

: 2002-09-11: Queue#((<Queue/pop>))

Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))

: 2002-09-11: SizedQueue.new

引数に 0 以下を受けつけるバグが修正されました。

: 2002-09-05: ((<リテラル/式展開>))

stable snapshot で、一...
...CGI#header

以下のようなスクリプトでTEXT_PLAINが"text/plain; charset=iso-8859-1"
のように書き換えられていました。
((<ruby-dev:14716>))

require 'cgi'

TEXT_PLAIN = "text/plain"

cgi = CGI.new
print cgi.header("type" => TEXT_PLAIN,...
...iso-8859-1")
printf("TEXT_PLAIN: %s\n", TEXT_PLAIN)

=> ruby 1.6.4 (2001-06-04) [i586-linux]
Content-Type: text/plain; charset=iso-8859-1
^M
TEXT_PLAIN: text/plain; charset=iso-8859-1
TEXT_PLAIN: text/plain

=> ruby 1.6.5 (2001-09-1...

CGI#header(options = "text/html") -> String (18155.0)

HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。

...字列で HTTP ヘッダを生成するための情報を指定します。

例:
header

# Content-Type: text/html

header
("text/plain")
# Content-Type: text/plain

header
({"nph" => true,
"status" => "OK", # == "200 OK"...
...e.now + 30,
"cookie" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"})

例:
cgi = CGI.new('html3')
print cgi.header({"charset" => "shift_jis", "status" => "OK"})
print "<html><head><title>TIT...

WEBrick::HTTPUtils::FormData#[](header) -> String | nil (135.0)

自身が multipart/form-data なデータの場合に、header で指定された ヘッダの値を文字列で返します。無ければ nil を返します。

...自身が multipart/form-data なデータの場合に、header で指定された
ヘッダの値を文字列で返します。無ければ nil を返します。

@param header ヘッダ名を文字列で指定します。大文字と小文字を区別しません。

例:

require "webrick/cgi...
..."
class MyCGI < WEBrick::CGI
def do_GET(req, res)
p req.query['q']['content-type'] #=> "plain/text"
end
end
MyCGI.new.start()...

CGI#out(options = "text/html") { .... } (36.0)

HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。

...指定します。

例:
cgi = CGI.new
cgi.out{ "string" }
# Content-Type: text/html
# Content-Length: 6
#
# string

cgi.out("text/plain"){ "string" }
# Content-Type: text/plain
# Content-Length: 6
#...
...tml; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.now + (3600 * 24 * 30),
"cookie" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"}){ "string" }

@see CGI#header...