summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorPaul Berry <paul@puppetlabs.com>2011-01-12 15:41:39 -0800
committerPaul Berry <paul@puppetlabs.com>2011-01-12 16:31:50 -0800
commitabc62560f78fa227d6ffd3263a095665609a15b5 (patch)
tree355ffda7e188f504d7cd21d89f44babedd718697 /lib/puppet
parent002f9f1905b089ebca628a6b743c0659e30ff9bc (diff)
downloadpuppet-abc62560f78fa227d6ffd3263a095665609a15b5.tar.gz
puppet-abc62560f78fa227d6ffd3263a095665609a15b5.tar.xz
puppet-abc62560f78fa227d6ffd3263a095665609a15b5.zip
(#5838) Support paths as part of file bucket requests.
In versions of Puppet 2.6.0-2.6.4, file bucket requests are of the form md5/<checksum>/<path>. The path functionality has been removed, however we still need to support requests coming from older clients. Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/indirector/file_bucket_file/file.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/indirector/file_bucket_file/file.rb b/lib/puppet/indirector/file_bucket_file/file.rb
index 38e0be6e9..8bea2d767 100644
--- a/lib/puppet/indirector/file_bucket_file/file.rb
+++ b/lib/puppet/indirector/file_bucket_file/file.rb
@@ -73,7 +73,7 @@ module Puppet::FileBucketFile
end
def request_to_checksum( request )
- checksum_type, checksum = request.key.split(/\//, 2)
+ checksum_type, checksum, path = request.key.split(/\//, 3) # Note: we ignore path if present.
raise "Unsupported checksum type #{checksum_type.inspect}" if checksum_type != 'md5'
raise "Invalid checksum #{checksum.inspect}" if checksum !~ /^[0-9a-f]{32}$/
checksum