diff options
author | Luke Kanies <luke@madstop.com> | 2009-02-19 16:09:58 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-02-19 17:51:22 -0600 |
commit | 262937ff6e505bbf86d15500279ff23398f9e1c8 (patch) | |
tree | 66084a1e14ed86f19982b800f60d332c139c8a36 /lib/puppet/file_serving | |
parent | b800bde30bd5a08f5e222725588062e2bca37a79 (diff) | |
download | puppet-262937ff6e505bbf86d15500279ff23398f9e1c8.tar.gz puppet-262937ff6e505bbf86d15500279ff23398f9e1c8.tar.xz puppet-262937ff6e505bbf86d15500279ff23398f9e1c8.zip |
Correctly handling URI escaping throughout the REST process
This means, at the least, that we can now serve files
via REST when they have spaces and other weird characters
in their names.
This involves a small change to many files.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/file_serving')
-rw-r--r-- | lib/puppet/file_serving/configuration.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/puppet/file_serving/configuration.rb b/lib/puppet/file_serving/configuration.rb index de5995d7e..608924c8b 100644 --- a/lib/puppet/file_serving/configuration.rb +++ b/lib/puppet/file_serving/configuration.rb @@ -9,10 +9,8 @@ require 'puppet/file_serving/mount/file' require 'puppet/file_serving/mount/modules' require 'puppet/file_serving/mount/plugins' require 'puppet/util/cacher' -require 'puppet/util/uri_helper' class Puppet::FileServing::Configuration - include Puppet::Util::URIHelper require 'puppet/file_serving/configuration/parser' class << self @@ -70,9 +68,7 @@ class Puppet::FileServing::Configuration # Reparse the configuration if necessary. readconfig - uri = key2uri(request.key) - - mount_name, path = uri.path.sub(/^\//, '').split(File::Separator, 2) + mount_name, path = request.key.split(File::Separator, 2) raise(ArgumentError, "Cannot find file: Invalid path '%s'" % mount_name) unless mount_name =~ %r{^[-\w]+$} |