13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/puppet/indirector/file_metadata/http.rb', line 13
def find(request)
checksum_type = request.options[:checksum_type]
uri = URI(request.uri)
client = Puppet.runtime[:http]
head = client.head(uri, options: { include_system_store: true })
return create_httpmetadata(head, checksum_type) if head.success?
case head.code
when 403, 405
get = partial_get(client, uri)
return create_httpmetadata(get, checksum_type) if get.success?
end
nil
end
|