diff options
Diffstat (limited to 'lib/chef/http/api_versions.rb')
-rw-r--r-- | lib/chef/http/api_versions.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/http/api_versions.rb b/lib/chef/http/api_versions.rb index 696c7072bf..674d8f85a7 100644 --- a/lib/chef/http/api_versions.rb +++ b/lib/chef/http/api_versions.rb @@ -32,6 +32,9 @@ class Chef end def handle_response(http_response, rest_request, return_value) + if http_response.code == "406" + ServerAPIVersions.instance.reset! + end if http_response.key?("x-ops-server-api-version") ServerAPIVersions.instance.set_versions(JSONCompat.parse(http_response["x-ops-server-api-version"])) end |