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.



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

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



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

def body
  @body
end

Instance Method Details

#[](var) ⇒ Object



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

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

#cookiesObject



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

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

#meta_varsObject



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

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

#userObject



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

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