るりまサーチ

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

別のキーワード

  1. httpserver mount_proc
  2. webrick/httpserver mount_proc
  3. httpserver mount
  4. webrick/httpserver mount
  5. mount_proc

キーワード

検索結果

WEBrick::HTTPAuth::BasicAuth (3029.0)

HTTP の Basic 認証のためのクラスです。

...HTTP の Basic 認証のためのクラスです。



require 'webrick'
realm = "WEBrick's realm"
srv = WEBrick::HTTPServer.new({ :BindAddress => '127.0.0.1', :Port => 10080})

htpd = WEBrick::HTTPAuth::Htpasswd.new('dot.htpasswd')
htpd.set_passwd(nil, 'username', 'supersecre...
...tpass')

authenticator = WEBrick::HTTPAuth::BasicAuth.new(:UserDB => htpd, :Realm => realm)
srv.mount_proc('/basic_auth') {|req, res|
authenticator.authenticate(req, res)
res.body = "hoge"
}
srv.start # http://127.0.0.1:10080/basic_auth...

WEBrick::HTTPServlet::ProcHandler (3007.0)

Proc を扱うためのサーブレット。

...Proc を扱うためのサーブレット。

WEBrick::HTTPServer#mount に引数として与えることは出来ません。
WEBrick::HTTPServer#mount_procを使ってください。...