# File lib/puppet/network/http/rack/xmlrpc.rb, line 42
42:     def build_client_request(request)
43:         ip = request.ip
44: 
45:         # if we find SSL info in the headers, use them to get a hostname.
46:         # try this with :ssl_client_header.
47:         # For Apache you need special configuration, see ext/rack/README.
48:         if dn = ssl_client_header(request) and dn_matchdata = dn.match(/^.*?CN\s*=\s*(.*)/)
49:             node = dn_matchdata[1].to_str
50:             authenticated = (ssl_client_verify_header(request) == 'SUCCESS')
51:         else
52:             begin
53:                 node = Resolv.getname(ip)
54:             rescue => detail
55:                 Puppet.err "Could not resolve %s: %s" % [ip, detail]
56:                 node = "unknown"
57:             end
58:             authenticated = false
59:         end
60: 
61:         Puppet::Network::ClientRequest.new(node, ip, authenticated)
62:     end