11件ヒット
[1-11件を表示]
(0.039秒)
ライブラリ
-
webrick
/ httpproxy (11)
検索結果
先頭1件
-
WEBrick
:: HTTPProxyServer . new(config , default = WEBrick :: Config :: HTTP) -> WEBrick :: HTTPProxyServer (31.0) -
プロクシオブジェクトを生成して返します。
...。
認証に失敗した場合 proc は適切な例外を発生させなければいけません。nil を指定した場合すべての接続を
受け付けます。デフォルトは nil です。通常は WEBrick::HTTPAuth::ProxyBasicAuth か
WEBrick::HTTPAuth::ProxyDigestAuth を使用......roxy-Authenticate'] = 'Basic realm="WEBrick Proxy"'
raise WEBrick::HTTPStatus::ProxyAuthenticationRequired
else
# 略
end
}
s = WEBrick::HTTPProxyServer.new(ProxyAuthProc: auth_proc, Port: 8080)
//}
: :ProxyContentHandler
接続先の HTTP サーバからの内容を処理する......WEBrick::HTTPRequest オブジェクトを引数として proc.call(req, res) のように呼ばれます。
nil を指定した場合なにもしません。デフォルトは nil です。
//emlist{
require 'webrick'
require 'webrick/httpproxy'
handler = proc{|req, res|
res.body.gsub!(/...