summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-08-23 18:15:56 -0500
committerLuke Kanies <luke@madstop.com>2008-08-26 22:40:39 -0700
commitf5ba99fd24ce2e7cdba7c81153c46df14811d193 (patch)
tree909d98edc1a711cbaa5eb19cac420ef6d919666a /lib/puppet
parenta215abaef97ea1fb0187f46c5e6a880ff1d29036 (diff)
downloadpuppet-f5ba99fd24ce2e7cdba7c81153c46df14811d193.tar.gz
puppet-f5ba99fd24ce2e7cdba7c81153c46df14811d193.tar.xz
puppet-f5ba99fd24ce2e7cdba7c81153c46df14811d193.zip
Special-casing 'file' URIs in the indirection requests.
These just get converted to full file paths, since we know they will never pass over the wire. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/indirector/request.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/puppet/indirector/request.rb b/lib/puppet/indirector/request.rb
index f1d02cead..194b9e031 100644
--- a/lib/puppet/indirector/request.rb
+++ b/lib/puppet/indirector/request.rb
@@ -60,6 +60,13 @@ class Puppet::Indirector::Request
rescue => detail
raise ArgumentError, "Could not understand URL %s: %s" % [source, detail.to_s]
end
+
+ # Just short-circuit these to full paths
+ if uri.scheme == "file"
+ @key = uri.path
+ return
+ end
+
@server = uri.host if uri.host
# If the URI class can look up the scheme, it will provide a port,