Class: SOAP::RPC::CGIStub::SOAPFCGIRequest

Inherits:
SOAPRequest show all
Defined in:
lib/soap/rpc/cgistub.rb

Constant Summary

Constants inherited from SOAPRequest

SOAP::RPC::CGIStub::SOAPRequest::EMPTY_COOKIES

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ SOAPFCGIRequest

Returns a new instance of SOAPFCGIRequest.



79
80
81
82
# File 'lib/soap/rpc/cgistub.rb', line 79

def initialize(request)
  @request = request
  @body = @request.in.read
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



77
78
79
# File 'lib/soap/rpc/cgistub.rb', line 77

def body
  @body
end

Instance Method Details

#[](var) ⇒ Object



84
85
86
# File 'lib/soap/rpc/cgistub.rb', line 84

def [](var)
  @request.env[var.gsub(/-/, '_').upcase]
end

#cookiesObject



94
95
96
97
98
99
100
# File 'lib/soap/rpc/cgistub.rb', line 94

def cookies
  if cookie = @request.env['HTTP_Cookie'] || @request.env['Cookie']
    [WEBrick::Cookie.parse(cookie)]
  else
    EMPTY_COOKIES
  end
end

#meta_varsObject



88
89
90
91
92
# File 'lib/soap/rpc/cgistub.rb', line 88

def meta_vars
  {
    'HTTP_SOAPACTION' => @request.env['HTTP_SOAPAction']
  }
end

#userObject



102
103
104
# File 'lib/soap/rpc/cgistub.rb', line 102

def user
  @request.env['REMOTE_USER']
end