From f5ba99fd24ce2e7cdba7c81153c46df14811d193 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Sat, 23 Aug 2008 18:15:56 -0500 Subject: 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 --- lib/puppet/indirector/request.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') 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, -- cgit