Allow pac+file proxy scheme to load PAC file from local filesystem
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
This commit is contained in:
parent
1708b38d7b
commit
de088c18b9
@ -613,7 +613,7 @@ def proxy_from_url(url):
|
||||
raise InvalidUrlError(url)
|
||||
|
||||
scheme = url.scheme()
|
||||
if scheme in ['pac+http', 'pac+https']:
|
||||
if scheme in ['pac+http', 'pac+https', 'pac+file']:
|
||||
return pac.PACFetcher(url)
|
||||
|
||||
types = {
|
||||
|
@ -1483,6 +1483,7 @@ class TestProxy:
|
||||
'none',
|
||||
'http://user:pass@example.com:2323/',
|
||||
'pac+http://example.com/proxy.pac',
|
||||
'pac+file:///tmp/proxy.pac'
|
||||
])
|
||||
def test_validate_valid(self, klass, val):
|
||||
klass(none_ok=True).validate(val)
|
||||
|
Loading…
Reference in New Issue
Block a user