Hello, Here is an updated patch with comments from Ewoud Kohl van Wijngaarden [1].
[1]: https://github.com/theforeman/puppet-puppet/pull/520#discussion_r128732270 Regards -- Mathieu Parent
From 7e0ef6b59020a96d6736f05efc717442e4f7052a Mon Sep 17 00:00:00 2001 From: Mathieu Parent <mathieu.par...@nantesmetropole.fr> Date: Fri, 21 Jul 2017 12:16:28 +0200 Subject: [PATCH] Fix "No supported formats are acceptable (Accept: s, pson)" while bucketing from Puppet Agent v3 --- debian/patches/0004-add-puppet3-compat-middleware.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/patches/0004-add-puppet3-compat-middleware.patch b/debian/patches/0004-add-puppet3-compat-middleware.patch index 04b6f3f53..04b72f7d7 100644 --- a/debian/patches/0004-add-puppet3-compat-middleware.patch +++ b/debian/patches/0004-add-puppet3-compat-middleware.patch @@ -4,10 +4,11 @@ Description: Add Puppet 3 client compatibility under rack per[1]. This should restore compatibility with Puppet 3 clients when run under any rack-enabled server (including Passenger). Forwarded: no (deprecated upstream) -Last-Update: 2017-01-11 +Last-Update: 2017-07-21 + --- a/ext/rack/config.ru +++ b/ext/rack/config.ru -@@ -25,6 +25,74 @@ +@@ -25,6 +25,73 @@ # delivered during catalog compilation. ARGV << "--always_cache_features" @@ -62,9 +63,8 @@ Last-Update: 2017-01-11 + env['QUERY_STRING'] = Rack::Utils.build_query(@req.params) + end + -+ if @api =~ /^file_(content|bucket_file)/ && @req.get? -+ env["HTTP_ACCEPT"] = "binary" -+ elsif @api == "file_bucket_file" && (@req.post? || @req.put?) ++ env["HTTP_ACCEPT"] = env["HTTP_ACCEPT"].split(/\s*,\s*/).map { |a| a.sub(/^raw|s$/, 'binary') }.uniq.join(', ') ++ if @api == "file_bucket_file" && (@req.post? || @req.put?) + env["CONTENT_TYPE"] = "application/octet-stream" + end + -- 2.13.2