diff options
author | Peder O. Klingenberg <peder@klingenberg.no> | 2018-04-13 15:08:18 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2018-04-13 15:08:18 +0200 |
commit | 9822a6a5708227897432f47d3f676c646b7bd4b2 (patch) | |
tree | 1d7a79656a69a35b1ec3a5165e66dcecbab69066 /lisp/url/url-vars.el | |
parent | fa416937997a113d84ab4e4910d730ce5d77613d (diff) | |
download | emacs-9822a6a5708227897432f47d3f676c646b7bd4b2.tar.gz |
Change gnutls-verify-error to be first-match
* doc/misc/url.texi (Customization): Describe the new user
option url-lastloc-privacy-level.
* lisp/net/eww.el (eww-render): Set url-current-lastloc to the
url we are rendering, to get the referer header right on
subsequent requests.
* lisp/url/url-http.el (url-http--get-referer): New function
to determine which referer to send, if any, considering the
users privacy settings and the target url we are visiting.
(url-http-referer): New variable keeping track of the referer
computed by url-http--get-referer
(url-http-create-request): Use url-http-referer instead of the
optional argument to set up the referer header. Leave
checking of privacy settings to url-http--get-referer.
(url-http): Set up url-http-referer by using
url-http--get-referer.
* lisp/url/url-queue.el (url-queue): New struct member
context-buffer for keeping track of the context a queued job
started from.
(url-queue-retrieve): Store the current buffer in the queue
object.
(url-queue-start-retrieve): Make sure url-retrieve is called
in the context of the original buffer, if available.
* lisp/url/url-util.el (url-domain): New function to determine
the domain of a given URL.
* lisp/url/url-vars.el (url-current-lastloc): New variable to
keep track of the desired "last location" (referer header).
(url-lastloc-privacy-level): New custom setting for more
fine-grained control over how lastloc (referer) is sent to
servers (Bug#27012).
Diffstat (limited to 'lisp/url/url-vars.el')
-rw-r--r-- | lisp/url/url-vars.el | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 62abcffe393..6ef21684a6c 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -60,10 +60,18 @@ (defvar url-current-mime-headers nil "A parsed representation of the MIME headers for the current URL.") +(defvar url-current-lastloc nil + "A parsed representation of the URL to be considered as the last location. +Use of this value on outbound connections is subject to +`url-privacy-level' and `url-lastloc-privacy-level'. This is never set +by the url library, applications are expected to set this +variable in buffers representing a displayed location.") + (mapc 'make-variable-buffer-local '( url-current-object url-current-mime-headers + url-current-lastloc )) (defcustom url-honor-refresh-requests t @@ -117,7 +125,7 @@ Valid symbols are: email -- the email address os -- the operating system info emacs -- the version of Emacs -lastloc -- the last location +lastloc -- the last location (see also `url-lastloc-privacy-level') agent -- do not send the User-Agent string cookies -- never accept HTTP cookies @@ -150,6 +158,24 @@ variable." (const :tag "No cookies" :value cookie))) :group 'url) +(defcustom url-lastloc-privacy-level 'domain-match + "Further restrictions on sending the last location. +This value is only consulted if `url-privacy-level' permits +sending last location in the first place. + +Valid values are: +none -- Always send last location. +domain-match -- Send last location if the new location is within the + same domain +host-match -- Send last location if the new location is on the + same host +" + :version "26.1" + :type '(radio (const :tag "Always send" none) + (const :tag "Domains match" domain-match) + (const :tag "Hosts match" host-match)) + :group 'url) + (defvar url-inhibit-uncompression nil "Do not do decompression if non-nil.") (defcustom url-uncompressor-alist '((".z" . "x-gzip") |