Class: WEBrick::HTTPServer

Inherits:
Object
  • Object
show all
Defined in:
lib/core/webrick.rb

Instance Method Summary collapse

Instance Method Details

#_rwfp_the_original_service_methodObject

‘duck punching’ the service method



8
# File 'lib/core/webrick.rb', line 8

alias _rwfp_the_original_service_method service

#service(req, res) ⇒ Object

to get req.properties to the response object



10
11
12
13
14
# File 'lib/core/webrick.rb', line 10

def service(req,res)        # to get req.properties to the response object
  res._rwfp_set_user_agent( req.meta_vars['HTTP_USER_AGENT'] )
  res._rwfp_set_options( {} )
  _rwfp_the_original_service_method(req,res)
end