Project

General

Profile

Actions

Bug #3920

closed

WEBrick::HTTPServlet::ProcHandler が動かない

Bug #3920: WEBrick::HTTPServlet::ProcHandler が動かない

Added by okkez (okkez _) about 15 years ago. Updated over 14 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2p14 (2010-10-02 revision 29393) [x86_64-linux]
Backport:
[ruby-dev:42347]

Description

=begin
以下のパッチで直りますが、テストが必要なように思います。

Index: httpservlet/prochandler.rb

--- httpservlet/prochandler.rb (revision 29410)
+++ httpservlet/prochandler.rb (working copy)
@@ -14,11 +14,8 @@
module HTTPServlet

 class ProcHandler < AbstractServlet 
  •  def get_instance(server, *options) 
  •  self 
  •  end 
  •  def initialize(proc) 
  •  def initialize(server, proc) @proc = proc end 

以下のスクリプトで動作確認しました。

require 'webrick'
srv = WEBrick::HTTPServer.new({:DocumentRoot => '.',
:BindAddress => '127.0.0.1',
:Port => 10080})
srv.mount('/proc', WEBrick::HTTPServlet::ProcHandler,
lambda{|request, response| response.body = 'Hello' })
Signal.trap(:INT){ srv.shutdown }
srv.start
=end


Files

test_prochandler.rb (811 Bytes) test_prochandler.rb okkez (okkez _), 10/08/2010 07:17 PM

Updated by okkez (okkez _) about 15 years ago Actions #1

=begin
さっき付けた添付ファイルはテストです。
=end

Updated by okkez (okkez _) about 15 years ago Actions #2

=begin
すみません。
WEBrick::HTTPServer#mount_proc を使うんですね。
リジェクトしてください。
=end

Updated by znz (Kazuhiro NISHIYAMA) about 15 years ago Actions #3

  • Status changed from Open to Rejected

=begin

=end

Actions

Also available in: PDF Atom