]> code.delx.au - gnu-emacs/blobdiff - lisp/url/url-proxy.el
Fix typos in ChangeLogs.
[gnu-emacs] / lisp / url / url-proxy.el
index c3bfb1e0c4b7ec6e503cbb42d4b7f5578a5f5654..4067f5a55ce6af8989c67adff0d8ff70002b97ad 100644 (file)
@@ -1,15 +1,15 @@
 ;;; url-proxy.el --- Proxy server support
 
-;; Copyright (C) 1999, 2004, 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Keywords: comm, data, processes, hypermedia
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,9 +17,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Code:
 
   ;; Retrieve URL from a proxy.
   ;; Expects `url-using-proxy' to be bound to the specific proxy to use."
   (setq url-using-proxy (url-generic-parse-url url-using-proxy))
-  (let ((proxy-object (copy-sequence url)))
-    (url-set-target proxy-object nil)
-    (url-http url-using-proxy callback cbargs)))
 
+  (cond
+   ((string= (url-type url-using-proxy) "http")
+    (url-http url callback cbargs))
+   (t
+    (error "Don't know how to use proxy `%s'" url-using-proxy))))
+  
 (provide 'url-proxy)
 
-;;; arch-tag: 4ff8882e-e498-42b7-abc5-acb449cdbc62
+;; arch-tag: 4ff8882e-e498-42b7-abc5-acb449cdbc62
 ;;; url-proxy.el ends here