mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 08:04:49 +01:00
webagg: use prepare_auth() to ensure Authorization header is set for http://user:pass@host urls
This commit is contained in:
parent
82d3b61523
commit
c8b6a48005
@ -277,6 +277,13 @@ class LiveWebLoader(BaseLoader):
|
||||
|
||||
p = PreparedRequest()
|
||||
p.prepare_url(load_url, None)
|
||||
p.prepare_headers(None)
|
||||
p.prepare_auth(None, load_url)
|
||||
|
||||
auth = p.headers.get('Authorization')
|
||||
if auth:
|
||||
req_headers['Authorization'] = auth
|
||||
|
||||
load_url = p.url
|
||||
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user