# File lib/puppet/network/http/mongrel/rest.rb, line 74
74:   def client_info(request)
75:     result = {}
76:     params = request.params
77:     result[:ip] = params["HTTP_X_FORWARDED_FOR"] ? params["HTTP_X_FORWARDED_FOR"].split(',').last.strip : params["REMOTE_ADDR"]
78: 
79:     # JJM #906 The following dn.match regular expression is forgiving
80:     # enough to match the two Distinguished Name string contents
81:     # coming from Apache, Pound or other reverse SSL proxies.
82:     if dn = params[Puppet[:ssl_client_header]] and dn_matchdata = dn.match(/^.*?CN\s*=\s*(.*)/)
83:       result[:node] = dn_matchdata[1].to_str
84:       result[:authenticated] = (params[Puppet[:ssl_client_verify_header]] == 'SUCCESS')
85:     else
86:       result[:node] = resolve_node(result)
87:       result[:authenticated] = false
88:     end
89: 
90:     result
91:   end