Make process_header private
This should never have been added in a public way. I feel we are ok making this private as there is no public use i can foresee. Change-Id: Ib95365a11fa21146d51bea103c7709943aafdae8
This commit is contained in:
@@ -148,8 +148,8 @@ class Session(object):
|
|||||||
if user_agent is not None:
|
if user_agent is not None:
|
||||||
self.user_agent = user_agent
|
self.user_agent = user_agent
|
||||||
|
|
||||||
@classmethod
|
@staticmethod
|
||||||
def process_header(cls, header):
|
def _process_header(header):
|
||||||
"""Redacts the secure headers to be logged."""
|
"""Redacts the secure headers to be logged."""
|
||||||
secure_headers = ('authorization', 'x-auth-token',
|
secure_headers = ('authorization', 'x-auth-token',
|
||||||
'x-subject-token',)
|
'x-subject-token',)
|
||||||
@@ -186,7 +186,7 @@ class Session(object):
|
|||||||
if headers:
|
if headers:
|
||||||
for header in six.iteritems(headers):
|
for header in six.iteritems(headers):
|
||||||
string_parts.append('-H "%s: %s"'
|
string_parts.append('-H "%s: %s"'
|
||||||
% Session.process_header(header))
|
% self._process_header(header))
|
||||||
if json:
|
if json:
|
||||||
data = jsonutils.dumps(json)
|
data = jsonutils.dumps(json)
|
||||||
if data:
|
if data:
|
||||||
@@ -217,7 +217,7 @@ class Session(object):
|
|||||||
string_parts.append('[%s]' % status_code)
|
string_parts.append('[%s]' % status_code)
|
||||||
if headers:
|
if headers:
|
||||||
for header in six.iteritems(headers):
|
for header in six.iteritems(headers):
|
||||||
string_parts.append('%s: %s' % Session.process_header(header))
|
string_parts.append('%s: %s' % self._process_header(header))
|
||||||
if text:
|
if text:
|
||||||
string_parts.append('\nRESP BODY: %s\n' % text)
|
string_parts.append('\nRESP BODY: %s\n' % text)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user