Class: Tofu::CGITofulet
- Inherits:
-
WEBrick::CGI
- Object
- WEBrick::CGI
- Tofu::CGITofulet
- Defined in:
- lib/tofu.rb
Instance Method Summary collapse
-
#initialize(bartender, *args) ⇒ CGITofulet
constructor
A new instance of CGITofulet.
- #service(req, res) ⇒ Object
- #start(env, stdin, stdout) ⇒ Object
Constructor Details
#initialize(bartender, *args) ⇒ CGITofulet
Returns a new instance of CGITofulet.
462 463 464 465 |
# File 'lib/tofu.rb', line 462 def initialize(, *args) @bartender = super(*args) end |
Instance Method Details
#service(req, res) ⇒ Object
467 468 469 |
# File 'lib/tofu.rb', line 467 def service(req, res) Context.new(req, res).service(@bartender) end |
#start(env, stdin, stdout) ⇒ Object
471 472 473 474 475 476 477 478 479 |
# File 'lib/tofu.rb', line 471 def start(env, stdin, stdout) if env["SERVER_SOFTWARE"] @config[:ServerSoftware] = env["SERVER_SOFTWARE"] end if %r{HTTP/(\d+\.\d+)} =~ env["SERVER_PROTOCOL"] @config[:HTTPVersion] = $1 end super(env, stdin, stdout) end |