mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-23 16:19:49 -05:00
Fix test_brozzling::httpd fixture
We used `self.headers.getheader` which no longer works. We replace it with `self.headers.get`. We change the code to write binary data to `self.wfile` because we get an exception for writing str and/or None.
This commit is contained in:
parent
ee8ef23f0c
commit
a1f9122317
@ -67,8 +67,8 @@ def httpd(request):
|
||||
self.send_header('WWW-Authenticate', 'Basic realm=\"Test\"')
|
||||
self.send_header('Content-type', 'text/html')
|
||||
self.end_headers()
|
||||
self.wfile.write(self.headers.getheader('Authorization'))
|
||||
self.wfile.write('not authenticated')
|
||||
self.wfile.write(self.headers.get('Authorization', b''))
|
||||
self.wfile.write(b'not authenticated')
|
||||
else:
|
||||
super().do_GET()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user