summaryrefslogtreecommitdiff
path: root/glanceclient/common/http.py
diff options
context:
space:
mode:
authorwangxiyuan <wangxiyuan@huawei.com>2018-07-26 11:31:08 +0800
committerwangxiyuan <wangxiyuan@huawei.com>2018-07-26 11:41:27 +0800
commiteba4bb06d9aeaaf18a7e393ae8c03d47bd052f20 (patch)
treef5020ceeb35f3cd5e43c955cc7c4cc9ee1f36c3c /glanceclient/common/http.py
parent2c26f2748f433fbb510715532b45973768bf7483 (diff)
downloadpython-glanceclient-eba4bb06d9aeaaf18a7e393ae8c03d47bd052f20.tar.gz
Skip quote '=' for token header
If the token is encoded by base64, it may contain '=' char as well. We should skip quoting it. Change-Id: I1ca63d251fa366f0e8e58128d45b729a2489b65c Partial-Bug: #1783290
Diffstat (limited to 'glanceclient/common/http.py')
-rw-r--r--glanceclient/common/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/glanceclient/common/http.py b/glanceclient/common/http.py
index b5bea8a..a5fb153 100644
--- a/glanceclient/common/http.py
+++ b/glanceclient/common/http.py
@@ -66,7 +66,7 @@ def encode_headers(headers):
for h, v in headers.items():
if v is not None:
# if the item is token, do not quote '+' as well.
- safe = '+/' if h in TOKEN_HEADERS else '/'
+ safe = '=+/' if h in TOKEN_HEADERS else '/'
if six.PY2:
# incoming items may be unicode, so get them into something
# the py2 version of urllib can handle before percent encoding