File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1165,8 +1165,8 @@ def emit(self, record):
11651165 h .putheader ("Content-length" , str (len (data )))
11661166 if self .credentials :
11671167 import base64
1168- s = ('u %s:%s' % self .credentials ).encode ('utf-8' )
1169- s = 'Basic ' + base64 .b64encode (s ).strip ()
1168+ s = ('%s:%s' % self .credentials ).encode ('utf-8' )
1169+ s = 'Basic ' + base64 .b64encode (s ).strip (). decode ( 'ascii' )
11701170 h .putheader ('Authorization' , s )
11711171 h .endheaders ()
11721172 if self .method == "POST" :
Original file line number Diff line number Diff line change @@ -1672,7 +1672,8 @@ def test_output(self):
16721672 secure_client = secure and sslctx
16731673 self .h_hdlr = logging .handlers .HTTPHandler (host , '/frob' ,
16741674 secure = secure_client ,
1675- context = context )
1675+ context = context ,
1676+ credentials = ('foo' , 'bar' ))
16761677 self .log_data = None
16771678 root_logger .addHandler (self .h_hdlr )
16781679
You can’t perform that action at this time.
0 commit comments