diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-21 17:06:34 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-21 17:06:34 +0000 |
| commit | ea4b9c83810976235d3486d42e22ec8cf279abf1 (patch) | |
| tree | 47d96c63d4df72bedba65debce315f7601290734 /lib | |
| parent | c99843a75a837c042d231242896851ff56e91d34 (diff) | |
| download | puppet-ea4b9c83810976235d3486d42e22ec8cf279abf1.tar.gz puppet-ea4b9c83810976235d3486d42e22ec8cf279abf1.tar.xz puppet-ea4b9c83810976235d3486d42e22ec8cf279abf1.zip | |
Fixing #285, opened by ericb.
The problem here was that I was not escaping URIs throughout the chain, which
I am now doing.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1642 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/puppet/server/fileserver.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/type/pfile.rb | 14 |
2 files changed, 7 insertions, 9 deletions
diff --git a/lib/puppet/server/fileserver.rb b/lib/puppet/server/fileserver.rb index cb32212c9..85f0f5016 100755 --- a/lib/puppet/server/fileserver.rb +++ b/lib/puppet/server/fileserver.rb @@ -198,6 +198,8 @@ class Server def convert(url, client, clientip) readconfig + url = URI.unescape(url) + mount, stub = splitpath(url, client) authcheck(url, mount, client, clientip) diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index 86b608c07..7ce384077 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -740,25 +740,21 @@ module Puppet end end - #ignore = self[:ignore] || false ignore = self[:ignore] - #self.warning "Listing path %s with ignore %s" % - # [path.inspect, ignore.inspect] desc = server.list(path, self[:links], r, ignore) - + + # Now create a new child for every file returned in the list. desc.split("\n").each { |line| file, type = line.split("\t") - next if file == "/" + next if file == "/" # skip the listing object name = file.sub(/^\//, '') - #self.warning "child name is %s" % name args = {:source => source + file} if type == file args[:recurse] = nil end + self.newchild(name, false, args) - #self.newchild(hash, source, recurse) - #hash2child(hash, source, recurse) } end @@ -862,7 +858,7 @@ module Puppet sourceobj.local = true end begin - uri = URI.parse(source) + uri = URI.parse(URI.escape(source)) rescue => detail self.fail "Could not understand source %s: %s" % [source, detail.to_s] |
