るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.079秒)
トップページ > クエリ:Integer[x] > クエリ:to_s[x] > クラス:WEBrick::HTTPResponse[x]

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

ライブラリ

キーワード

検索結果

WEBrick::HTTPResponse#content_length -> Integer | nil (108.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) (8.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...