るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.114秒)

別のキーワード

  1. rss content=
  2. rss content
  3. net/imap content_id
  4. rss20 content=
  5. source content=

ライブラリ

クラス

検索結果

WEBrick::HTTPResponse#content_length=(len) (21107.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...れません。

@param len ヘッダの値を整数で指定します。nil を指定することは出来ません。

require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
p
rint 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 -> Integer | nil (6007.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...れません。

@param len ヘッダの値を整数で指定します。nil を指定することは出来ません。

require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
p
rint 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...