(self, header)
| 935 | self.add_password = self.passwd.add_password |
| 936 | |
| 937 | def _parse_realm(self, header): |
| 938 | # parse WWW-Authenticate header: accept multiple challenges per header |
| 939 | found_challenge = False |
| 940 | for mo in AbstractBasicAuthHandler.rx.finditer(header): |
| 941 | scheme, quote, realm = mo.groups() |
| 942 | if quote not in ['"', "'"]: |
| 943 | import warnings |
| 944 | warnings.warn("Basic Auth Realm was unquoted", |
| 945 | UserWarning, 3) |
| 946 | |
| 947 | yield (scheme, realm) |
| 948 | |
| 949 | found_challenge = True |
| 950 | |
| 951 | if not found_challenge: |
| 952 | if header: |
| 953 | scheme = header.split()[0] |
| 954 | else: |
| 955 | scheme = '' |
| 956 | yield (scheme, None) |
| 957 | |
| 958 | def http_error_auth_reqed(self, authreq, host, req, headers): |
| 959 | # host may be an authority (without userinfo) or a URL with an |
no test coverage detected