Sha256: 78843b4df45ade39bbed3c923dd73648a0b8e19f87469b29be95149bdbe445bf

Contents?: true

Size: 734 Bytes

Versions: 299

Compression:

Stored size: 734 Bytes

Contents

require 'puppet/file_serving/http_metadata'
require 'puppet/indirector/generic_http'
require 'puppet/indirector/file_metadata'
require 'net/http'

class Puppet::Indirector::FileMetadata::Http < Puppet::Indirector::GenericHttp
  desc "Retrieve file metadata from a remote HTTP server."

  include Puppet::FileServing::TerminusHelper

  @http_method = :head

  def find(request)
    head = super

    if head.is_a?(Net::HTTPSuccess)
      metadata = Puppet::FileServing::HttpMetadata.new(head)
      metadata.checksum_type = request.options[:checksum_type] if request.options[:checksum_type]
      metadata.collect
      metadata
    end
  end

  def search(request)
    raise Puppet::Error, _("cannot lookup multiple files")
  end
end

Version data entries

299 entries across 299 versions & 2 rubygems

Version Path
puppet-5.5.22 lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.22-x86-mingw32 lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.22-x64-mingw32 lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.22-universal-darwin lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.21 lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.21-x86-mingw32 lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.21-x64-mingw32 lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.21-universal-darwin lib/puppet/indirector/file_metadata/http.rb
puppet-6.15.0 lib/puppet/indirector/file_metadata/http.rb
puppet-6.15.0-x86-mingw32 lib/puppet/indirector/file_metadata/http.rb
puppet-6.15.0-x64-mingw32 lib/puppet/indirector/file_metadata/http.rb
puppet-6.15.0-universal-darwin lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.20 lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.20-x86-mingw32 lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.20-x64-mingw32 lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.20-universal-darwin lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.19 lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.19-x86-mingw32 lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.19-x64-mingw32 lib/puppet/indirector/file_metadata/http.rb
puppet-5.5.19-universal-darwin lib/puppet/indirector/file_metadata/http.rb