Merge branch 'netrc' of https://github.com/paretje/qutebrowser into paretje-netrc
This commit is contained in:
commit
26b6688b61
@ -163,9 +163,9 @@ Contributors, sorted by the number of commits in descending order:
|
|||||||
* Corentin Julé
|
* Corentin Julé
|
||||||
* meles5
|
* meles5
|
||||||
* Philipp Hansch
|
* Philipp Hansch
|
||||||
|
* Kevin Velghe
|
||||||
* Daniel Karbach
|
* Daniel Karbach
|
||||||
* Panagiotis Ktistakis
|
* Panagiotis Ktistakis
|
||||||
* Kevin Velghe
|
|
||||||
* Artur Shaik
|
* Artur Shaik
|
||||||
* Nathan Isom
|
* Nathan Isom
|
||||||
* Thorsten Wißmann
|
* Thorsten Wißmann
|
||||||
|
@ -69,6 +69,7 @@
|
|||||||
|<<network-ssl-strict,ssl-strict>>|Whether to validate SSL handshakes.
|
|<<network-ssl-strict,ssl-strict>>|Whether to validate SSL handshakes.
|
||||||
|<<network-dns-prefetch,dns-prefetch>>|Whether to try to pre-fetch DNS entries to speed up browsing.
|
|<<network-dns-prefetch,dns-prefetch>>|Whether to try to pre-fetch DNS entries to speed up browsing.
|
||||||
|<<network-custom-headers,custom-headers>>|Set custom headers for qutebrowser HTTP requests.
|
|<<network-custom-headers,custom-headers>>|Set custom headers for qutebrowser HTTP requests.
|
||||||
|
|<<network-netrc-file,netrc-file>>|Set location of netrc-file for HTTP authentication.
|
||||||
|==============
|
|==============
|
||||||
|
|
||||||
.Quick reference for section ``completion''
|
.Quick reference for section ``completion''
|
||||||
@ -808,6 +809,12 @@ Set custom headers for qutebrowser HTTP requests.
|
|||||||
|
|
||||||
Default: empty
|
Default: empty
|
||||||
|
|
||||||
|
[[network-netrc-file]]
|
||||||
|
=== netrc-file
|
||||||
|
Set location of netrc-file for HTTP authentication.
|
||||||
|
|
||||||
|
Default: empty
|
||||||
|
|
||||||
== completion
|
== completion
|
||||||
Options related to completion and command history.
|
Options related to completion and command history.
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ class NetworkManager(QNetworkAccessManager):
|
|||||||
# altogether.
|
# altogether.
|
||||||
reply.netrc_used = True
|
reply.netrc_used = True
|
||||||
try:
|
try:
|
||||||
net = netrc.netrc()
|
net = netrc.netrc(config.get('network', 'netrc-file'))
|
||||||
authenticators = net.authenticators(reply.url().host())
|
authenticators = net.authenticators(reply.url().host())
|
||||||
if authenticators is not None:
|
if authenticators is not None:
|
||||||
(user, _account, password) = authenticators
|
(user, _account, password) = authenticators
|
||||||
|
@ -438,6 +438,10 @@ def data(readonly=False):
|
|||||||
SettingValue(typ.HeaderDict(none_ok=True), ''),
|
SettingValue(typ.HeaderDict(none_ok=True), ''),
|
||||||
"Set custom headers for qutebrowser HTTP requests."),
|
"Set custom headers for qutebrowser HTTP requests."),
|
||||||
|
|
||||||
|
('netrc-file',
|
||||||
|
SettingValue(typ.File(none_ok=True), ''),
|
||||||
|
"Set location of netrc-file for HTTP authentication."),
|
||||||
|
|
||||||
readonly=readonly
|
readonly=readonly
|
||||||
)),
|
)),
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user