diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-07-19 02:56:40 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-07-19 02:56:40 +0200 |
commit | 17f646128f04e9e8590f0371026a14d516f21c63 (patch) | |
tree | 50e9cba5cc2bca35f7943ae285fcbbc9c6d21139 /lisp/gnus | |
parent | 42b33405c2c5aef43439ec7e9e9e690b948cc4b1 (diff) | |
download | emacs-17f646128f04e9e8590f0371026a14d516f21c63.tar.gz emacs-17f646128f04e9e8590f0371026a14d516f21c63.tar.bz2 emacs-17f646128f04e9e8590f0371026a14d516f21c63.zip |
Allow open-network-stream to use different TLS capability commands
* doc/lispref/processes.texi (Network): Document non-string
capability command.
* lisp/gnus/nntp.el (nntp-open-connection): Use HELP for Typhoon
and CAPABILITIES for everything else (bug#41960).
* lisp/net/network-stream.el (open-network-stream): Document
function variety of :capability-command.
(network-stream-open-starttls): Use it.
(network-stream-open-tls): Ditto.
(network-stream-open-shell): Ditto.
(network-stream--capability-command): New helper function.
Diffstat (limited to 'lisp/gnus')
-rw-r--r-- | lisp/gnus/nntp.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 02d90603b40..a5c82447926 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -1263,7 +1263,17 @@ If SEND-IF-FORCE, only send authinfo to the server if the "nntpd" pbuffer nntp-address nntp-port-number :type (cadr (assoc nntp-open-connection-function map)) :end-of-command "^\\([2345]\\|[.]\\).*\n" - :capability-command "HELP\r\n" + :capability-command + (lambda (greeting) + (if (and greeting + (string-match "Typhoon" greeting)) + ;; Certain versions of the Typhoon server + ;; doesn't understand the CAPABILITIES + ;; command, but includes the capability + ;; data in the HELP command instead. + "HELP\r\n" + ;; Use the correct command for everything else. + "CAPABILITIES\r\n")) :success "^3" :starttls-function (lambda (capabilities) |