mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-23 10:42:14 +01:00
Merge pull request #1126 from dmach/0.x/fix-getallmatchingheaders
SSH auth: Fix getallmatchingheaders() output to correspond with headers.get_all()
This commit is contained in:
commit
ed7e360368
@ -540,7 +540,12 @@ def _build_opener(apiurl):
|
|||||||
if hasattr(headers, "get_all"):
|
if hasattr(headers, "get_all"):
|
||||||
all_headers = headers.get_all('www-authenticate', [])
|
all_headers = headers.get_all('www-authenticate', [])
|
||||||
else:
|
else:
|
||||||
all_headers = headers.getallmatchingheaders('www-authenticate')
|
all_headers = []
|
||||||
|
header_name = 'www-authenticate'
|
||||||
|
for header in headers.getallmatchingheaders(header_name):
|
||||||
|
header = header[len(header_name) + 1:].lstrip()
|
||||||
|
all_headers.append(header)
|
||||||
|
|
||||||
for authreq in all_headers:
|
for authreq in all_headers:
|
||||||
scheme = authreq.split()[0].lower()
|
scheme = authreq.split()[0].lower()
|
||||||
authreqs[scheme] = authreq
|
authreqs[scheme] = authreq
|
||||||
|
Loading…
x
Reference in New Issue
Block a user