別のキーワード
ライブラリ
- ビルトイン (108)
-
cgi
/ html (48) - csv (12)
- fcntl (12)
-
net
/ imap (12) - openssl (72)
-
rake
/ rdoctask (264) -
rexml
/ document (276) -
rexml
/ parsers / pullparser (12) -
rexml
/ sax2listener (12) -
rexml
/ streamlistener (24) -
webrick
/ httpresponse (72)
クラス
- CSV (12)
- IO (12)
-
Net
:: IMAP (12) -
OpenSSL
:: ASN1 :: OctetString (24) -
REXML
:: DocType (216) -
REXML
:: Document (12) -
REXML
:: Parsers :: PullEvent (12) -
REXML
:: Text (36) -
Rake
:: RDocTask (252) - String (48)
-
WEBrick
:: HTTPResponse (72)
モジュール
-
CGI
:: Html3 (12) -
CGI
:: Html4 (12) -
CGI
:: Html4Fr (12) -
CGI
:: Html4Tr (12) - Enumerable (12)
- Fcntl (12)
-
File
:: Constants (12) - Kernel (12)
-
OpenSSL
:: ASN1 (36) - Process (12)
-
REXML
:: SAX2Listener (12) -
REXML
:: StreamListener (24)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
DEFAULT
_ ENTITIES (12) - DocType (12)
- Integer (12)
- NOCTTY (12)
-
OCTET
_ STRING (12) -
O
_ NOCTTY (12) - OctetString (36)
- RDocTask (12)
- [] (12)
- add (12)
-
attribute
_ of (12) -
attributes
_ of (12) - body= (12)
- chunk (12)
- chunked= (12)
- clone (12)
-
content
_ length (12) -
content
_ length= (12) - context (12)
- define (12)
- doctype (96)
- doctype? (12)
-
doctype
_ end (12) - entities (12)
- entity (12)
- external (12)
- external= (12)
-
external
_ id (12) - fetch (12)
- hex (12)
- ioctl (24)
- main (12)
- main= (12)
- name (24)
- name= (12)
- namespaces (12)
- new (48)
-
node
_ type (12) - normalize (12)
- notation (12)
- notations (12)
-
option
_ list (12) -
option
_ string (12) - public (12)
- quote (12)
-
rake
/ rdoctask (12) -
rdoc
_ dir (12) -
rdoc
_ dir= (12) -
rdoc
_ files (12) -
rdoc
_ files= (12) -
ruby 1
. 8 . 4 feature (12) - setproctitle (12)
- system (12)
- template (12)
- template= (12)
- title (12)
- title= (12)
-
to
_ f (12) -
to
_ i (12) -
to
_ s (12) - unnormalize (12)
- write (12)
検索結果
先頭5件
-
WEBrick
:: HTTPResponse # body=(val) (6.0) -
クライアントに返す内容(エンティティボディ)をセットします。
...ディングされます。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 08:58:49 GMT
Server:
Content-Length: 4
hoge... -
WEBrick
:: HTTPResponse # chunked=(flag) (6.0) -
真に設定するとクライアントに返す内容(エンティティボディ)を chunk に分けるようになります。
...ick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
res.chunked = true
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 09:04:28 GMT
Server:
Transfer-Encoding: chunked
4
hoge
0
#... -
WEBrick
:: HTTPResponse # content _ length -> Integer | nil (6.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 12:04:32 GMT
Server:
Content-Length: 2
ho... -
WEBrick
:: HTTPResponse # content _ length=(len) (6.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 12:04:32 GMT
Server:
Content-Length: 2
ho... -
WEBrick
:: HTTPResponse # to _ s -> String (6.0) -
実際にクライアントに送られるデータを文字列として返します。
...列として返します。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 08:58:49 GMT
Server:
Content-Length: 4
hoge...