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.



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

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



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

def body
  @body
end

Instance Method Details

#[](var) ⇒ Object



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

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

#cookiesObject



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

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

#meta_varsObject



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

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

#userObject



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

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