るりまサーチ

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

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub

ライブラリ

クラス

モジュール

キーワード

検索結果

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

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

...を変換しません。

ヘッダのキーとしては以下が利用可能です。

: type
Content-Type ヘッダです。デフォルトは "text/html" です。
: charset
ボディのキャラクタセットを Content-Type ヘッダに追加します。
: nph
真偽値を指定します...
...字列で HTTP ヘッダを生成するための情報を指定します。

例:
header

# Content-Type: text/html

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

header
({"nph" => true,
"status" => "OK", # == "200 OK"...
...=> "text/html",
"charset" => "iso-2022-jp",
# Content-Type: text/html; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.now + 30,
"cookie" => [cookie1, cookie2],
"my_header1" => "...

Kernel#create_header(header = "extconf.h") -> String (6437.0)

Kernel#have_func, Kernel#have_header などの検査結果を元に、 ヘッダファイルを生成します。

...Kernel#have_func, Kernel#have_header などの検査結果を元に、
ヘッダファイルを生成します。

このメソッドは extconf.rb の最後で呼び出すようにしてください。

@param header ヘッダファイルの名前を指定します。

@return ヘッダファイ...
...ルの名前を返します。



# extconf.rb
require 'mkmf'
have_func('realpath')
have_header('sys/utime.h')
create_header
create_makefile('foo')

上の extconf.rb は以下の extconf.h を生成します。

#ifndef EXTCONF_H
#define EXTCONF_H
#define HAVE_REALPATH 1
#def...

ruby 1.8.4 feature (462.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...e (Win全般) [bug]>))
* ((<ruby 1.8.4 feature/File::Stat#pipe? [bug]>))
* ((<ruby 1.8.4 feature/Array#fill [bug]>))
* ((<ruby 1.8.4 feature/String#scan [bug]>))
* ((<ruby 1.8.4 feature/File.join [bug]>))
* ((<ruby 1.8.4 feature/Thread#pass [bug]>))
* ((<ruby 1.8.4 feature/Module#const_m...
...* ((<ruby 1.8.4 feature/cgi [bug]>))
* ((<ruby 1.8.4 feature/DL [bug]>))
* ((<ruby 1.8.4 feature/fileutils [bug]>))
* ((<ruby 1.8.4 feature/extmk, mkmf [compat]>))
* ((<ruby 1.8.4 feature/mkmf: find_executable() [compat]>))
* ((<ruby 1.8.4 feature/拡張ライブラリAPI>))
* ((<ruby 1...
...: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...

ruby 1.6 feature (330.0)

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

...りました。

p "#{ "" }"

=> ruby 1.6.7 (2002-03-01) [i586-linux]
""

=> -:1: warning: bad substitution in string
ruby 1.6.7 (2002-09-12) [i586-linux]
"#{ }"

=> ruby 1.6.7 (2002-09-25) [i586-linux]
""

これは1.7...
...: 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...

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

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

...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
#
# string

cgi.out({"nph"...
...ENV['SERVER_SOFTWARE'],
"connection" => "close",
"type" => "text/html",
"charset" => "iso-2022-jp",
# Content-Type: text/html; charset=iso-2022-jp
"language" => "ja",
"expires" => Ti...
...me.now + (3600 * 24 * 30),
"cookie" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"}){ "string" }

@see CGI#header...

絞り込み条件を変える

ruby 1.8.3 feature (60.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...t convert Fixnum into String (TypeError)
from -e:1

=== 2005-09-16
: File.extname [ruby] [compat]

与えられた pathname がピリオドで終る場合、ピリオドではなく空の文字列を返すようになりました。

$ ruby-1.8.2 -e 'p File.extname("a.")'
"."...
...$ ruby-1.8.3 -e 'p File.extname("a.")'
""

=== 2005-09-13
: Logger#formatter [lib] [new]
: Logger#formatter= [lib] [new]
: Logger::Formatter [lib] [new]

追加。

=== 2005-09-13
: Net::HTTP

https での Proxy 認証をサポートするようになりました。

: Net::HTTP.post_fo...
...::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...