diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2011-04-02 19:41:03 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2011-04-02 19:41:03 -0400 |
commit | da91b5f294f8ec77f48f1bbe27707a0d33d981e9 (patch) | |
tree | 877f9242d950613bfa159fde2ecb9fc915d13ab2 /lisp/url/url-gw.el | |
parent | 1d2e369d6cc534d812f5fc025fd9f1f52e7df710 (diff) | |
download | emacs-da91b5f294f8ec77f48f1bbe27707a0d33d981e9.tar.gz emacs-da91b5f294f8ec77f48f1bbe27707a0d33d981e9.tar.bz2 emacs-da91b5f294f8ec77f48f1bbe27707a0d33d981e9.zip |
Merge open-protocol-stream into open-network-stream.
* lisp/subr.el (open-network-stream): Move to net/network-stream.el.
* lisp/gnus/proto-stream.el: Move to net/network-stream.el.
* lisp/net/network-stream.el: Move from gnus/proto-stream.el.
Change prefix to network-stream throughout.
(open-protocol-stream): Merge into open-network-stream, leaving
open-protocol-stream as an alias. Handle nil BUFFER args.
* lisp/gnus/nnimap.el (nnimap-open-connection-1): Pass explicit :end-of-command
parameter to open-protocol-stream.
* lisp/emacs-lisp/package.el (package--with-work-buffer): Recognize
https URLs.
* lisp/url/url-gw.el (url-open-stream): Use new open-network-stream
functionality to perform encryption.
Diffstat (limited to 'lisp/url/url-gw.el')
-rw-r--r-- | lisp/url/url-gw.el | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el index 2ba23583528..7d80f2f6725 100644 --- a/lisp/url/url-gw.el +++ b/lisp/url/url-gw.el @@ -28,8 +28,6 @@ ;; Fixme: support SSH explicitly or via a url-gateway-rlogin-program? (autoload 'socks-open-network-stream "socks") -(autoload 'open-ssl-stream "ssl") -(autoload 'open-tls-stream "tls") (defgroup url-gateway nil "URL gateway variables." @@ -219,13 +217,6 @@ Might do a non-blocking connection; use `process-status' to check." host)) 'native url-gateway-method)) -;;; ;; This hack is for OS/2 Emacs so that it will not do bogus CRLF -;;; ;; conversions while trying to be 'helpful' -;;; (tcp-binary-process-output-services (if (stringp service) -;;; (list service) -;;; (list service -;;; (int-to-string service)))) - ;; An attempt to deal with denied connections, and attempt ;; to reconnect (cur-retries 0) @@ -243,19 +234,15 @@ Might do a non-blocking connection; use `process-status' to check." (let ((coding-system-for-read 'binary) (coding-system-for-write 'binary)) (setq conn (case gw-method - (tls - (funcall (if (fboundp 'open-gnutls-stream) - 'open-gnutls-stream - 'open-tls-stream) - name buffer host service)) - (ssl - (open-ssl-stream name buffer host service)) - ((native) - ;; Use non-blocking socket if we can. - (make-network-process :name name :buffer buffer - :host host :service service - :nowait - (featurep 'make-network-process '(:nowait t)))) + ((tls ssl native) + (if (eq gw-method 'native) + (setq gw-method 'plain)) + (open-network-stream + name buffer host service + :type gw-method + ;; Use non-blocking socket if we can. + :nowait (featurep 'make-network-process + '(:nowait t)))) (socks (socks-open-network-stream name buffer host service)) (telnet @@ -264,13 +251,7 @@ Might do a non-blocking connection; use `process-status' to check." (url-open-rlogin name buffer host service)) (otherwise (error "Bad setting of url-gateway-method: %s" - url-gateway-method))))) - ;; Ignoring errors here seems wrong. E.g. it'll throw away the - ;; error signaled two lines above. It was also found inconvenient - ;; during debugging. - ;; (error - ;; (setq conn nil)) - ) + url-gateway-method)))))) conn))) (provide 'url-gw) |