* lisp/url/url-http.el (url-user-agent): Move from here...
* lisp/url/url-vars.el (url-user-agent): ...to here. This is to
keep all the URL defcustoms in one place, and also have it defined
whenever the URL library is loaded.
* doc/misc/url.texi (Customization): Document 'url-user-agent'.
@end table
@end defopt
+@defopt url-user-agent
+The User Agent string used for sending HTTP/HTTPS requests. The value
+should be a string or a function of no arguments that returns a
+string. The default value is @w{@samp{User-Agent: @var{package-name}
+URL/Emacs}}, where @var{package-name} is the value of
+@code{url-package-name} and its version, if they are non-@code{nil}.
+@end defopt
+
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include doclicense.texi
When `url-handler-mode' is enabled, file operations for these
protocols as well as for "telnet" and "ftp" are passed to Tramp.
++++
*** The URL package allows customizing the `url-user-agent' string.
The new `url-user-agent' variable can be customized to be a string or
a function.
(507 insufficient-storage "Insufficient storage"))
"The HTTP return codes and their text.")
-(defcustom url-user-agent (format "User-Agent: %sURL/%s\r\n"
- (if url-package-name
- (concat url-package-name "/"
- url-package-version " ")
- "") url-version)
- "User Agent used by the URL package."
- :type '(choice (string :tag "A static User-Agent string")
- (function :tag "Call a function to get the User-Agent string"))
- :version "25.1"
- :group 'url)
-
;(eval-when-compile
;; These are all macros so that they are hidden from external sight
;; when the file is byte-compiled.
(const :tag "Direct connection" :value native))
:group 'url-hairy)
+(defcustom url-user-agent (format "User-Agent: %sURL/%s\r\n"
+ (if url-package-name
+ (concat url-package-name "/"
+ url-package-version " ")
+ "") url-version)
+ "User Agent used by the URL package for HTTP/HTTPS requests
+Should be a string or a function of no arguments returning a string."
+ :type '(choice (string :tag "A static User-Agent string")
+ (function :tag "Call a function to get the User-Agent string"))
+ :version "25.1"
+ :group 'url)
+
(defvar url-setup-done nil "Has setup configuration been done?")
(defconst url-weekday-alist