24件ヒット
[1-24件を表示]
(0.054秒)
ライブラリ
-
webrick
/ httpauth / digestauth (12) -
webrick
/ httpproxy (12)
クラス
検索結果
先頭2件
-
WEBrick
:: HTTPAuth :: ProxyDigestAuth (24000.0) -
プロクシの Digest 認証のためのクラスです。
...プロクシの Digest 認証のためのクラスです。... -
WEBrick
:: HTTPProxyServer . new(config , default = WEBrick :: Config :: HTTP) -> WEBrick :: HTTPProxyServer (106.0) -
プロクシオブジェクトを生成して返します。
...Auth::ProxyDigestAuth を使用します。
//emlist{
require 'webrick'
require 'webrick/httpproxy'
auth_proc = proc{|req, res|
unless c = req['proxy-authorization']
res['Proxy-Authenticate'] = 'Basic realm="WEBrick Proxy"'
raise WEBrick::HTTPStatus::ProxyAuthenticationRequired
el......se
# 略
end
}
s = WEBrick::HTTPProxyServer.new(ProxyAuthProc: auth_proc, Port: 8080)
//}
: :ProxyContentHandler
接続先の HTTP サーバからの内容を処理する Proc オブジェクトを指定します。
レスポンスの内容を書き換えたりする事が出来ます......list{
require 'webrick'
require 'webrick/httpproxy'
handler = proc{|req, res|
res.body.gsub!(/です。/, 'でんがな。')
res.body.gsub!(/ます。/, 'まんがな。')
}
s = WEBrick::HTTPProxyServer.new(ProxyContentHandler: handler, Port: 8080)
//}
: :ProxyVia
true を指定した...