mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-19 03:28:04 -04: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
1 changed files with 2 additions and 2 deletions
|
@ -67,8 +67,8 @@ def httpd(request):
|
||||||
self.send_header('WWW-Authenticate', 'Basic realm=\"Test\"')
|
self.send_header('WWW-Authenticate', 'Basic realm=\"Test\"')
|
||||||
self.send_header('Content-type', 'text/html')
|
self.send_header('Content-type', 'text/html')
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
self.wfile.write(self.headers.getheader('Authorization'))
|
self.wfile.write(self.headers.get('Authorization', b''))
|
||||||
self.wfile.write('not authenticated')
|
self.wfile.write(b'not authenticated')
|
||||||
else:
|
else:
|
||||||
super().do_GET()
|
super().do_GET()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue