別のキーワード
種類
- 文書 (59)
- インスタンスメソッド (33)
- ライブラリ (11)
クラス
- CGI (22)
モジュール
-
Net
:: HTTPHeader (11)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (4) -
cgi
/ session (11) - method (11)
- out (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11)
検索結果
先頭5件
-
CGI
# header(options = "text / html") -> String (18155.0) -
HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。
...uthorization Required"
"FORBIDDEN" --> "403 Forbidden"
"NOT_FOUND" --> "404 Not Found"
"METHOD_NOT_ALLOWED" --> "405 Method Not Allowed"
"NOT_ACCEPTABLE" --> "406 Not Acceptable"
"LENGTH_REQUIRED" --> "411 Length Required"......TED" --> "501 Method Not Implemented"
"BAD_GATEWAY" --> "502 Bad Gateway"
"VARIANT_ALSO_VARIES" --> "506 Variant Also Negotiates"
@param options Hash か文字列で HTTP ヘッダを生成するための情報を指定します。
例:
header
# Cont......ent-Type: text/html
header("text/plain")
# Content-Type: text/plain
header({"nph" => true,
"status" => "OK", # == "200 OK"
# "status" => "200 GOOD",
"server" => ENV['SERVER_SOFTWARE'],
"... -
Net
:: HTTPHeader # method -> String (9107.0) -
リクエストの HTTP メソッドを文字列で返します。
...リクエストの HTTP メソッドを文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//}... -
NEWS for Ruby 3
. 0 . 0 (138.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leading arguments.
16378
//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}
* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern......e, String => x, String => y, *post]
p pre #=> ["a", 1]
p x #=> "b"
p y #=> "c"
p post #=> [2, "d", "e", "f", 3]
end
//}
* Endless method definition is added. [EXPERIMENTAL]
16746
//emlist{
def square(x) = x * x
//}
* Interpolated String literals are no longer frozen when......ame have been added to skip hostname verification. 16555
* Net::HTTP.get, Net::HTTP.get_response, and Net::HTTP.get_print can take the request headers as a Hash in the second argument when the first argument is a URI. 16686
* Net::SMTP
* Add SNI support.
* Net::SMTP.start arguments a... -
ruby 1
. 6 feature (102.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...roc#yield を呼んでいました。
((<ruby-dev:16178>))
Marshal.load(Marshal.dump('foo'), proc {|o| p o})
=> -:1:in `load': undefined method `yield' for #<Proc:0x401b1b30> (NameError)
from -:1
ruby 1.6.7 (2002-03-01) [i586-linux]
=> ruby 1.6.6 (2001-12-26) [i586......"+\000"
"*+\000"
: method_missing
以下が Segmentation Fault していました。((<ruby-dev:14942>))
Module.constants.each {|c|
c = eval c
if c.instance_of?(Class)
p c
c.instance_methods.each {|m|
c.module_e......1303>))
: 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" => TEX... -
ruby 1
. 8 . 4 feature (90.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...[bug]>))
* ((<ruby 1.8.4 feature/シグナル [bug]>))
* ((<ruby 1.8.4 feature/組み込みライブラリ>))
* ((<ruby 1.8.4 feature/UnboundMethod#bind [bug]>))
* ((<ruby 1.8.4 feature/set_trace_func [bug]>))
* ((<ruby 1.8.4 feature/set_trace_func [change]>))
* ((<ruby 1.8.4 feature/prin......nd
#Tue Nov 1 14:20:11 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * eval.c (rb_call_super): should call method_missing if super is
# called from Kernel method.
#
# * eval.c (exec_under): frame during eval should preserve external
# information.
: super [bug]......:CGIHandler#do_GET): the value of Set-Cookie:
# header field should be splited into each cookie. [ruby-Bugs:2199]
#
# * lib/webrick/cookie.rb (WEBrick::Cookie.parse_set_cookie): new method
# to parse the value of Set-Cookie: header field.
#
# * test/webrick/test_cookie.r... -
NEWS for Ruby 2
. 0 . 0 (66.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...追加(実験的): Module#refine, スコープを限定してクラスやモジュールを拡張します。
* 拡張: Module#define_method は UnboundMethod を受け付けるようになりました
* 拡張: Module#const_get 修飾された定数名の文字列を受け付けるように......: Range#bsearch 二分探索
* RubyVM (MRI specific)
* 追加: RubyVM::InstructionSequence.of to get the instruction sequence
from a method or a block.
* 追加: RubyVM::InstructionSequence#path,
RubyVM::InstructionSequence#absolute_path,
RubyVM::InstructionSequence#labe......用のタグメーカーを追加しました
* CGI#header は CGI#http_header に名前を変更しました。CGI#header は別名として残っています。
* HTML5 用のタグメーカーを呼び出すと CGI#header を header 要素を生成するために上書きします。... -
ruby 1
. 9 feature (66.0) -
ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。
...: Hash#identical?
=== 2006-08-31
: Array#shuffle
: Array#shuffle!
追加
=== 2006-07-26
: __send
: __send!
追加
: invoke_method
: invoke_functional_method
削除
=== 2006-07-21
: Module#attr
オプショナル引数の assignable がなくなり、attr_reader 相当になりま......6-06-17
: BasicObject#invoke_method
: BasicObject#invoke_functional_method
追加
((<ruby-talk:197512>))
=== 2006-06-13
: IPsocket
: TCPsocket
: SOCKSsocket
: TCPserver
: UDPsocket
: UNIXsocket
: UNIXserver
削除
=== 2006-06-11
: __callee__ [new]
: __method__ [new]
((<URL:http://www......PHeader#add_header [lib] [new]
: Net::HTTPHeader#get_fields [lib] [new]
: Net::HTTPHeader#content_length= [lib] [new]
: Net::HTTPHeader#content_type [lib] [new]
: Net::HTTPHeader#main_type [lib] [new]
: Net::HTTPHeader#sub_type [lib] [new]
: Net::HTTPHeader#type_params [lib] [new]
: Net::HTTPHeader#... -
cgi
/ session (42.0) -
CGI のセッション管理を行うライブラリ。
...のセッション情報を取り出すときは、このようにします。
=== 使い方 (ヘッダ出力)
ヘッダ出力は CGI#out、CGI#header を使っている限り
通常通りで構いません。
cgi/session は内部的にクッキーを使用していますが、
これらのメソ......}
}
}
}
CGI.pretty(html)
}
#=>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<BODY>
<FORM METHOD="post" ENCTYPE="application/x-www-form-urlencoded" action="/sample.rb">
<P>
あなたの名前は?
<INPUT NAME="nam......ように(warning は出ます)
@cmd = 'start' if @cmd.empty?
@header = { "type" => "text/html", "charset" => "euc-jp" }
__send__("cmd_#{@cmd}")
end
def cmd_start
@cgi.out(@header) {
<<-END
<html><head><title>CGI::Session Demo</title></head... -
ruby 1
. 8 . 3 feature (36.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
...eUtils.options [lib] [new]
: FileUtils.have_option? [lib] [new]
: FileUtils.options_of [lib] [new]
: FileUtils.collect_method [lib] [new]
追加。
: FileUtils.rm_r [lib] [compat]
: FileUtils.rm_rf [lib] [compat]
: FileUtils.cd [lib] [compat]
: FileUtils.cp_r......::HTTPHeader#content_length= [lib] [new]
: Net::HTTPHeader#content_type [lib] [new]
: Net::HTTPHeader#main_type [lib] [new]
: Net::HTTPHeader#sub_type [lib] [new]
: Net::HTTPHeader#type_params [lib] [new]
: Net::HTTPHeader#content_type= [lib] [new]
: Net::HTTPHeader#set_c......ew]
: Net::HTTPRequest#body_stream(=) [lib] [new]
追加。
: Net::HTTPHeader#each_capitalized [lib] [compat]
: Net::HTTPHeader#each_capitalized_name [lib] [new]
Net::HTTPHeader#canonical_each は Net::HTTPHeader#each_capitalized
に名前が変わりました。canonical_each も eac... -
CGI
# out(options = "text / html") { . . . . } (24.0) -
HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。
...HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。
HEADリクエスト (REQUEST_METHOD == "HEAD") の場合は HTTP ヘッダのみを出力します。
charset が "iso-2022-jp"・"euc-jp"・"shift_jis" のいずれかで
ある場合は文字列エ......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...