X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/9fb9136398821ed5f3a8b4405bbc222964f54028..65c8c7cb96c14f9c6accd03cc8851b5a3459049e:/lisp/url/url-vars.el diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index bc23b982f8..f6aae21a83 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -1,6 +1,7 @@ ;;; url-vars.el --- Variables for Uniform Resource Locator tool -;; Copyright (C) 1996-1999, 2001, 2004-2014 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2001, 2004-2016 Free Software Foundation, +;; Inc. ;; Keywords: comm, data, processes, hypermedia @@ -115,15 +116,16 @@ If a list, this should be a list of symbols of what NOT to send. Valid symbols are: email -- the email address os -- the operating system info +emacs -- the version of Emacs lastloc -- the last location agent -- do not send the User-Agent string cookies -- never accept HTTP cookies Samples: - (setq url-privacy-level 'high) - (setq url-privacy-level '(email lastloc)) ;; equivalent to 'high - (setq url-privacy-level '(os)) + (setq url-privacy-level \\='high) + (setq url-privacy-level \\='(email lastloc)) ;; equivalent to \\='high + (setq url-privacy-level \\='(os)) ::NOTE:: This variable controls several other variables and is _NOT_ automatically @@ -142,6 +144,7 @@ variable." (checklist :tag "Custom" (const :tag "Email address" :value email) (const :tag "Operating system" :value os) + (const :tag "Emacs version" :value emacs) (const :tag "Last location" :value lastloc) (const :tag "Browser identification" :value agent) (const :tag "No cookies" :value cookie))) @@ -356,6 +359,23 @@ Currently supported methods: (const :tag "Direct connection" :value native)) :group 'url-hairy) +(defcustom url-user-agent 'default + "User Agent used by the URL package for HTTP/HTTPS requests. +Should be one of: +* A string (not including the \"User-Agent:\" prefix) +* A function of no arguments, returning a string +* `default' (to compute a value according to `url-privacy-level') +* nil (to omit the User-Agent header entirely)" + :type + '(choice + (string :tag "A static User-Agent string") + (function :tag "Call a function to get the User-Agent string") + (const :tag "No User-Agent at all" :value nil) + (const :tag "An string auto-generated according to `url-privacy-level'" + :value default)) + :version "25.2" + :group 'url) + (defvar url-setup-done nil "Has setup configuration been done?") (defconst url-weekday-alist