Mercurial > emacs
comparison lisp/url/url-gw.el @ 83219:e86fc76a45e4
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-611
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-612
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-613
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-614
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-615
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-46
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-47
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-48
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-49
Add {arch}/=commit-merge-make-log
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-50
{arch}/=commit-merge-make-log: Don't die if there are no ChangeLog changes
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-259
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Thu, 14 Oct 2004 14:42:03 +0000 |
parents | 8e5779acd195 202c408c174b |
children | 0fc4928cc48e |
comparison
equal
deleted
inserted
replaced
83218:47f53c5c9620 | 83219:e86fc76a45e4 |
---|---|
1 ;;; url-gw.el --- Gateway munging for URL loading | 1 ;;; url-gw.el --- Gateway munging for URL loading |
2 ;; Author: Bill Perry <wmperry@gnu.org> | 2 ;; Author: Bill Perry <wmperry@gnu.org> |
3 ;; Keywords: comm, data, processes | 3 ;; Keywords: comm, data, processes |
4 | 4 |
5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 ;;; Copyright (c) 1997, 1998 Free Software Foundation, Inc. | 6 ;;; Copyright (c) 1997, 1998, 2004 Free Software Foundation, Inc. |
7 ;;; | 7 ;;; |
8 ;;; This file is part of GNU Emacs. | 8 ;;; This file is part of GNU Emacs. |
9 ;;; | 9 ;;; |
10 ;;; GNU Emacs is free software; you can redistribute it and/or modify | 10 ;;; GNU Emacs is free software; you can redistribute it and/or modify |
11 ;;; it under the terms of the GNU General Public License as published by | 11 ;;; it under the terms of the GNU General Public License as published by |
27 | 27 |
28 ;; Fixme: support SSH explicitly or via a url-gateway-rlogin-program? | 28 ;; Fixme: support SSH explicitly or via a url-gateway-rlogin-program? |
29 | 29 |
30 (autoload 'socks-open-network-stream "socks") | 30 (autoload 'socks-open-network-stream "socks") |
31 (autoload 'open-ssl-stream "ssl") | 31 (autoload 'open-ssl-stream "ssl") |
32 (autoload 'open-tls-stream "tls") | |
32 | 33 |
33 (defgroup url-gateway nil | 34 (defgroup url-gateway nil |
34 "URL gateway variables" | 35 "URL gateway variables" |
35 :group 'url) | 36 :group 'url) |
36 | 37 |
210 "Open a stream to HOST, possibly via a gateway. | 211 "Open a stream to HOST, possibly via a gateway. |
211 Args per `open-network-stream'. | 212 Args per `open-network-stream'. |
212 Will not make a connexion if `url-gateway-unplugged' is non-nil." | 213 Will not make a connexion if `url-gateway-unplugged' is non-nil." |
213 (unless url-gateway-unplugged | 214 (unless url-gateway-unplugged |
214 (let ((gw-method (if (and url-gateway-local-host-regexp | 215 (let ((gw-method (if (and url-gateway-local-host-regexp |
216 (not (eq 'tls url-gateway-method)) | |
215 (not (eq 'ssl url-gateway-method)) | 217 (not (eq 'ssl url-gateway-method)) |
216 (string-match | 218 (string-match |
217 url-gateway-local-host-regexp | 219 url-gateway-local-host-regexp |
218 host)) | 220 host)) |
219 'native | 221 'native |
240 ;; This is a clean way to ensure the new process inherits the | 242 ;; This is a clean way to ensure the new process inherits the |
241 ;; right coding systems in both Emacs and XEmacs. | 243 ;; right coding systems in both Emacs and XEmacs. |
242 (let ((coding-system-for-read 'binary) | 244 (let ((coding-system-for-read 'binary) |
243 (coding-system-for-write 'binary)) | 245 (coding-system-for-write 'binary)) |
244 (setq conn (case gw-method | 246 (setq conn (case gw-method |
247 (tls | |
248 (open-tls-stream name buffer host service)) | |
245 (ssl | 249 (ssl |
246 (open-ssl-stream name buffer host service)) | 250 (open-ssl-stream name buffer host service)) |
247 ((native) | 251 ((native) |
248 (open-network-stream name buffer host service)) | 252 (open-network-stream name buffer host service)) |
249 (socks | 253 (socks |