The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

http.rb.patch

Gia Bao, 04/27/2013 04:33 am

Download (752 Bytes)

View differences:

lib/puppet/reports/http.rb (revision )
15 15
    url = URI.parse(Puppet[:reporturl])
16 16
    body = self.to_yaml
17 17
    headers = { "Content-Type" => "application/x-yaml" }
18
    if url.user
19
      basic_encode = 'Basic ' + ["#{url.user}:#{url.password}"].pack('m').delete("\r\n")
20
      headers['authorization'] = basic_encode
21
    end
18 22
    use_ssl = url.scheme == 'https'
19 23
    conn = Puppet::Network::HttpPool.http_instance(url.host, url.port, use_ssl)
20 24
    response = conn.post(url.path, body, headers)