diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2016-06-07 20:20:39 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2016-06-07 20:20:39 (GMT) |
commit | 24a72ca2391bcd3b951675d279763ac8bb78c98e (patch) | |
tree | 2243e8b41c541a5e21df757a1cfab99d98548355 /Lib/logging | |
parent | ea938baf5e1c74d9b04ad36e0ec5473bf95e7ed0 (diff) | |
parent | 1bf197eb14c5db5c43b3dc48687ae034690d34c4 (diff) | |
download | cpython-24a72ca2391bcd3b951675d279763ac8bb78c98e.zip cpython-24a72ca2391bcd3b951675d279763ac8bb78c98e.tar.gz cpython-24a72ca2391bcd3b951675d279763ac8bb78c98e.tar.bz2 |
Fixed #27251: merged fix from 3.5.
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/handlers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 6425356..c0748a8 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -1165,8 +1165,8 @@ class HTTPHandler(logging.Handler): h.putheader("Content-length", str(len(data))) if self.credentials: import base64 - s = ('u%s:%s' % self.credentials).encode('utf-8') - s = 'Basic ' + base64.b64encode(s).strip() + s = ('%s:%s' % self.credentials).encode('utf-8') + s = 'Basic ' + base64.b64encode(s).strip().decode('ascii') h.putheader('Authorization', s) h.endheaders() if self.method == "POST": |