summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-02-19 16:09:58 -0600
committerLuke Kanies <luke@madstop.com>2009-02-19 17:51:22 -0600
commit262937ff6e505bbf86d15500279ff23398f9e1c8 (patch)
tree66084a1e14ed86f19982b800f60d332c139c8a36 /lib/puppet/util
parentb800bde30bd5a08f5e222725588062e2bca37a79 (diff)
downloadpuppet-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/util')
-rw-r--r--lib/puppet/util/uri_helper.rb22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/puppet/util/uri_helper.rb b/lib/puppet/util/uri_helper.rb
deleted file mode 100644
index cb9320387..000000000
--- a/lib/puppet/util/uri_helper.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Created by Luke Kanies on 2007-10-16.
-# Copyright (c) 2007. All rights reserved.
-
-require 'uri'
-require 'puppet/util'
-
-# Helper methods for dealing with URIs.
-module Puppet::Util::URIHelper
- def key2uri(key)
- # Return it directly if it's fully qualified.
- if key =~ /^#{::File::SEPARATOR}/
- key = "file://" + key
- end
-
- begin
- uri = URI.parse(URI.escape(key))
- rescue => detail
- raise ArgumentError, "Could not understand URI %s: %s" % [key, detail.to_s]
- end
- end
-end