summaryrefslogtreecommitdiff
path: root/Gemfile
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-07-20 10:25:19 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-07-20 10:25:19 -0700
commitdf6dd3768d5fcc99a348bd52d7e6ffeaa1c391db (patch)
tree8e79fe5fd7b9102ed71a8a731b1492f4d1bd212c /Gemfile
parent020c42b59503692742e6298a35d1bf4b1d2b491c (diff)
downloadchef-df6dd3768d5fcc99a348bd52d7e6ffeaa1c391db.tar.gz
fix retries on JSON POST requests when negotiating protocol version
on the first pass through the JSON middleware it encodes the body. if there's a retry, it re-encodes the body as a string with all its metacharacters escaped. this is a particular issue when doing a first request that is a POST that requires negotiating the API version. when doing a GET it isn't a problem because there's no body payload -- but a POST or a PUT which requires a retry will get garbled and will cause a 500. this happens on hosted right now if trying to POST with a v2 API since hosted is only v1, so there's a retry to downgrade. i also made the same kind of changes to the streaming download requests, but since they're GETs its unclear to me if there was any impact there -- but middleware could have been double-mangling headers on a retry. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'Gemfile')
-rw-r--r--Gemfile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Gemfile b/Gemfile
index 7ce6a9c57d..b1fa640db9 100644
--- a/Gemfile
+++ b/Gemfile
@@ -50,6 +50,7 @@ end
group(:development, :test) do
gem "rake"
gem "simplecov"
+ gem "webmock"
# for testing new chefstyle rules
# gem 'chefstyle', github: 'chef/chefstyle'