From 0fac38cdf30489f6fba4eb862e56fa7b14a525c4 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 3 Jun 2019 15:18:18 -0400 Subject: [PATCH] Fix xcc breaking the standard webclient The XCC requires a different auth header for non-redfish calls. Isolate xcc changes to the xcc usage. Change-Id: I9891a0a3e79cbe119da96f6db6e12725ca86f3bd --- pyghmi/util/webclient.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyghmi/util/webclient.py b/pyghmi/util/webclient.py index 2d0afe1c..f62467da 100644 --- a/pyghmi/util/webclient.py +++ b/pyghmi/util/webclient.py @@ -17,6 +17,7 @@ # 2.6 as is found in commonly used enterprise linux distributions. import base64 +import copy import gzip import json import pyghmi.exceptions as pygexc @@ -121,7 +122,7 @@ class SecureHTTPConnection(httplib.HTTPConnection, object): if clone: self._certverify = clone._certverify self.cookies = clone.cookies - self.stdheaders = clone.stdheaders + self.stdheaders = copy.deepcopy(clone.stdheaders) else: self._certverify = verifycallback self.cookies = {}