るりまサーチ

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

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file open
  4. file size
  5. base file

ライブラリ

キーワード

検索結果

WEBrick::HTTPResponse#filename=(file) (6208.0)

自身の内容があるファイルのそれである場合に、そのファイル名をセットします。 デフォルトは nil です。

...自身の内容があるファイルのそれである場合に、そのファイル名をセットします。
デフォルトは nil です。

@param file ファイル名を表す文字列です。...

WEBrick::HTTPResponse#filename -> String | nil (6101.0)

自身の内容があるファイルのそれである場合に、そのファイル名を返します。 デフォルトは nil です。

自身の内容があるファイルのそれである場合に、そのファイル名を返します。
デフォルトは nil です。

WEBrick::HTTPResponse#content_length -> Integer | nil (7.0)

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

...を指定することは出来ません。

require 'webrick'
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...

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

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

...を指定することは出来ません。

require 'webrick'
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...