Sha256: fc9400147df3af5143a10909ecaf1dd16f51f7b3306e855eb1b5754ca61166ee
Contents?: true
Size: 853 Bytes
Versions: 134
Compression:
Stored size: 853 Bytes
Contents
require 'puppet/file_serving' # This module is used to pick the appropriate terminus # in file-serving indirections. This is necessary because # the terminus varies based on the URI asked for. module Puppet::FileServing::TerminusSelector def select(request) # We rely on the request's parsing of the URI. # Short-circuit to :file if it's a fully-qualified path or specifies a 'file' protocol. if Puppet::Util.absolute_path?(request.key) return :file end case request.protocol when "file" :file when "puppet" if request.server :rest else Puppet[:default_file_terminus] end when "http","https" :http when nil :file_server else raise ArgumentError, "URI protocol '#{request.protocol}' is not currently supported for file serving" end end end
Version data entries
134 entries across 134 versions & 2 rubygems