summaryrefslogtreecommitdiff
path: root/lisp/url
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@raeburn.org>2015-11-01 01:42:21 -0400
committerKen Raeburn <raeburn@raeburn.org>2015-11-01 01:42:21 -0400
commit39372e1a1032521be74575bb06f95a3898fbae30 (patch)
tree754bd242a23d2358ea116126fcb0a629947bd9ec /lisp/url
parent6a3121904d76e3b2f63007341d48c5c1af55de80 (diff)
parente11aaee266da52937a3a031cb108fe13f68958c3 (diff)
downloademacs-39372e1a1032521be74575bb06f95a3898fbae30.tar.gz
merge from trunk
Diffstat (limited to 'lisp/url')
-rw-r--r--lisp/url/.gitignore4
-rw-r--r--lisp/url/ChangeLog.1 (renamed from lisp/url/ChangeLog)594
-rw-r--r--lisp/url/url-about.el2
-rw-r--r--lisp/url/url-auth.el18
-rw-r--r--lisp/url/url-cache.el6
-rw-r--r--lisp/url/url-cid.el2
-rw-r--r--lisp/url/url-cookie.el19
-rw-r--r--lisp/url/url-dav.el16
-rw-r--r--lisp/url/url-dired.el2
-rw-r--r--lisp/url/url-domsuf.el23
-rw-r--r--lisp/url/url-expand.el2
-rw-r--r--lisp/url/url-file.el2
-rw-r--r--lisp/url/url-ftp.el2
-rw-r--r--lisp/url/url-future.el18
-rw-r--r--lisp/url/url-gw.el29
-rw-r--r--lisp/url/url-handlers.el92
-rw-r--r--lisp/url/url-history.el4
-rw-r--r--lisp/url/url-http.el105
-rw-r--r--lisp/url/url-imap.el2
-rw-r--r--lisp/url/url-irc.el2
-rw-r--r--lisp/url/url-ldap.el2
-rw-r--r--lisp/url/url-mailto.el2
-rw-r--r--lisp/url/url-methods.el2
-rw-r--r--lisp/url/url-misc.el10
-rw-r--r--lisp/url/url-news.el5
-rw-r--r--lisp/url/url-nfs.el2
-rw-r--r--lisp/url/url-ns.el2
-rw-r--r--lisp/url/url-parse.el4
-rw-r--r--lisp/url/url-privacy.el2
-rw-r--r--lisp/url/url-proxy.el2
-rw-r--r--lisp/url/url-queue.el13
-rw-r--r--lisp/url/url-tramp.el79
-rw-r--r--lisp/url/url-util.el31
-rw-r--r--lisp/url/url-vars.el21
-rw-r--r--lisp/url/url.el12
35 files changed, 740 insertions, 393 deletions
diff --git a/lisp/url/.gitignore b/lisp/url/.gitignore
deleted file mode 100644
index 362a9c89b75..00000000000
--- a/lisp/url/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-auto-autoloads.el
-custom-load.el
-url-auto.el
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog.1
index 52a69690534..8733614387a 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog.1
@@ -1,3 +1,200 @@
+2015-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * url-handlers.el (url-insert-file-contents): Call
+ after-insert-file-set-coding like insert-file-contents, to set
+ buffer-file-coding-system (bug#20010).
+
+2015-01-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Don't downcase system diagnostics' first letters
+ * url-dav.el (url-dav-delete-directory, url-dav-delete-file)
+ (url-dav-directory-files): Keep diagnostics consistent with system's.
+
+2015-01-17 Ivan Shmakov <ivan@siamics.net>
+
+ * url-cookie.el (url-cookie-write-file): Let-bind print-length
+ and print-level to nil to avoid writing a garbled list. (Bug#16805)
+
+2014-12-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * url-http.el (url-http-parse-headers): `gnutls-available-p' is
+ now always available.
+
+2014-12-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * url-http.el (url-http-parse-headers): Check that
+ `gnutls-available-p' is defined (bug#19346).
+
+2014-12-09 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * url-http.el (url-http-parse-headers): Pass the GnuTLS status of
+ the connection to the caller.
+ (url-http-parse-headers): When being redirected, make sure we
+ flush the previous certificate.
+
+2014-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * url-http.el (url-http-activate-callback): Make debug more verbose.
+
+2014-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * url-future.el (url-future-done-p, url-future-completed-p)
+ (url-future-errored-p, url-future-cancelled-p):
+ * url-dav.el (url-dav-http-success-p): Use define-inline.
+
+2014-11-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * url-http.el (url-http): Respect `url-request-noninteractive'.
+
+ * url-queue.el (url-queue-start-retrieve): Fetching through
+ url-queue should always be noninteractive.
+
+ * url-vars.el (url-request-noninteractive): New variable.
+
+2014-11-14 David Reitter <david.reitter@gmail.com>
+
+ * url-domsuf.el (url-domsuf-parse-file): Read compressed
+ publicsuffix file if available.
+
+2014-11-05 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * url-http.el (url-user-agent): New variable, can be function or
+ string. Suggested by Vibhav Pant <vibhavp@ubuntu.com>.
+ Add :version. (Bug#16498)
+
+ (url-http-user-agent-string): Use it.
+
+2014-10-29 Paul Eggert <eggert@cs.ucla.edu>
+
+ Simplify use of current-time and friends.
+ * url-cache.el (url-cache-prune-cache):
+ Rename local var to avoid confusion.
+ * url-util.el (url-get-normalized-date):
+ Omit unnecessary call to current-time.
+
+2014-10-20 Glenn Morris <rgm@gnu.org>
+
+ * Merge in all changes up to 24.4 release.
+
+2014-10-07 Eli Zaretskii <eliz@gnu.org>
+
+ * url-http.el (url-http-create-request): Recheck zlib availability
+ on windows-nt each time it might be required. (Bug#18650)
+
+2014-09-28 Ulf Jasper <ulf.jasper@web.de>
+
+ * url-gw.el (url-open-stream): New optional parameter
+ `gateway-method'. If non-nil use it instead of global variable
+ `url-gateway-method'.
+
+ * url/url-http.el (url-http): New optional parameter
+ `gateway-method', pass it to `url-http-find-free-connection'.
+ (url-http-find-free-connection): New optional parameter
+ gateway-method, pass it to `url-open-stream'.
+ (url-https-create-secure-wrapper): Do not modify
+ `url-gateway-method' but explicitly provide 'tls as gateway-method
+ parameter to `url-https'.
+
+2014-09-22 Dmitry Gutov <dgutov@yandex.ru>
+
+ * url.el (url-retrieve-internal): Clarify the docstring.
+
+ * url-http.el (url-http): Same. (Bug#18116)
+
+2014-08-07 Reuben Thomas <rrt@sc3d.org>
+
+ * url-handlers.el: Remove a comment about VMS, which we no longer
+ support.
+
+2014-08-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Don't mishandle dates in the year 9999 (Bug#18176).
+ * url-cookie.el (url-cookie-expired-p): Treat out-of-range
+ expiration dates as if they were far in the future.
+
+2014-06-26 Leo Liu <sdl.web@gmail.com>
+
+ * url-http.el (url-http-end-of-headers): Remove duplicate defvar.
+
+ * url-handlers.el (url-http-parse-response): Remove unused autoload.
+ (url-insert-file-contents): Condition on url-http-response-status
+ for the HTTP/S specific part. (Bug#17549)
+
+2014-05-14 Glenn Morris <rgm@gnu.org>
+
+ * url-util.el (url-make-private-file): Use with-file-modes.
+
+2014-05-12 Michael Albinus <michael.albinus@gmx.de>
+
+ * url-handlers.el (url-file-handler-load-in-progress): New defvar.
+ (url-file-handler): Use it, in order to avoid recursive load.
+
+2014-05-04 Glenn Morris <rgm@gnu.org>
+
+ * url-parse.el (url-generic-parse-url): Doc fix (replace `iff').
+
+2014-04-01 Michael Albinus <michael.albinus@gmx.de>
+
+ * url-tramp.el: New file.
+
+ * url-handlers.el (url-handler-regexp): Add ssh, scp, rsync and telnet.
+ Add :version.
+ (url-file-handler): Call `url-tramp-file-handler' if appropriate.
+
+2014-03-28 Glenn Morris <rgm@gnu.org>
+
+ * url-vars.el (url-bug-address): Make into an obsolete alias.
+ * url-http.el (url-http-handle-authentication):
+ * url-news.el (url-news-fetch-message-id):
+ Use M-x report-emacs-bug in help messages.
+
+2014-03-26 Juanma Barranquero <lekktu@gmail.com>
+
+ * url-handlers.el (url-http-parse-response): Add autoload.
+ (url-insert-file-contents): Signal file-error in case of HTTP error.
+
+2014-02-05 Glenn Morris <rgm@gnu.org>
+
+ * url-cookie.el (url-cookie-list): Doc fix.
+
+2014-01-25 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
+
+ * url-vars.el (url): Link to info manual.
+
+2014-01-08 Jarosław Rzeszótko <sztywny@gmail.com> (tiny change)
+
+ * url-http.el (url-http-create-request): Don't add extra \r\n after
+ http data (bug#16220).
+
+2013-12-28 Glenn Morris <rgm@gnu.org>
+
+ * url-history.el (url-history-track):
+ * url-vars.el (url-honor-refresh-requests): Fix custom types.
+
+2013-12-20 Leo Liu <sdl.web@gmail.com>
+
+ * url.el (url-retrieve-synchronously): Add optional arg SILENT and
+ INHIBIT-COOKIES.
+
+2013-09-29 Leo Liu <sdl.web@gmail.com>
+
+ * url-util.el (url-pretty-length): Make obsolete and all uses
+ changed to file-size-human-readable.
+
+2013-09-18 Glenn Morris <rgm@gnu.org>
+
+ * url-http.el (zlib-decompress-region): Declare.
+
+2013-09-16 Glenn Morris <rgm@gnu.org>
+
+ * url-misc.el (url-data): Avoid match-data mix-up with base64 case.
+ Use Content-Transfer-Encoding rather than Content-Encoding. (Bug#15285)
+
+2013-09-13 Glenn Morris <rgm@gnu.org>
+
+ * url-http.el (url-handle-content-transfer-encoding):
+ * url-vars.el (url-mime-encoding-string): Silence compiler.
+
2013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
* url-http.el (url-http-parse-headers): Always place point at the
@@ -5,19 +202,19 @@
2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
- * url-http.el (url-handle-content-transfer-encoding): Renamed
+ * url-http.el (url-handle-content-transfer-encoding): Rename
`zlib-decompress-gzipped-region' and check whether it's available,
too.
- (url-handle-content-transfer-encoding): Renamed
- `zlib-decompress-region' again.
+ (url-handle-content-transfer-encoding):
+ Rename `zlib-decompress-region' again.
2013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
* url-vars.el (url-mime-encoding-string): If we have built-in gzip
support, say that we accept gzipped content.
- * url-http.el (url-handle-content-transfer-encoding): Support
- decompressing gzipped content.
+ * url-http.el (url-handle-content-transfer-encoding):
+ Support decompressing gzipped content.
2013-07-31 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -262,7 +459,7 @@
2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
- * url-domsurf.el: New file (bug#1401).
+ * url-domsuf.el: New file (bug#1401).
* url-cookie.el (url-cookie-two-dot-domains): Remove.
(url-cookie-host-can-set-p): Use `url-domsuf-cookie-allowed-p'
@@ -1575,6 +1772,16 @@
* url-cookie.el (url-cookie-multiple-line): Fix spelling in docstring.
+2005-06-04 David Reitter <david.reitter@gmail.com> (tiny change)
+
+ * url-http.el (url-http-chunked-encoding-after-change-function):
+ Use `url-http-debug' instead of `message'.
+
+2005-06-04 Thierry Emery <thierry.emery@free.fr> (tiny change)
+
+ * url-http.el (url-http-parse-headers): Pass redirected URL
+ as a callback argument.
+
2005-05-19 Juanma Barranquero <lekktu@gmail.com>
* url-cookie.el (url-cookie-multiple-line):
@@ -1598,6 +1805,11 @@
* url.el (url-retrieve-synchronously): Work around the fact that
url-http sometimes doesn't call the callback.
+2005-04-10 Chong Yidong <cyd@stupidchicken.com>
+
+ * url-ldap.el (url-ldap): Add docstring. Fix call to
+ `ldap-search-internal'.
+
2005-04-04 Lute Kamstra <lute@gnu.org>
* url-handlers.el (url-handler-mode): Specify :group.
@@ -1856,27 +2068,27 @@
2003-07-16 Dave Love <fx@gnu.org>
- * lisp/url.el (url-retrieve-synchronously): Revert last change.
+ * url.el (url-retrieve-synchronously): Revert last change.
Should be revisited.
2003-06-26 Sam Steingold <sds@gnu.org>
- * lisp/url-handlers.el (url-handlers-create-wrapper): Do not call
+ * url-handlers.el (url-handlers-create-wrapper): Do not call
method on invalid urls.
2003-05-29 Dave Love <fx@gnu.org>
- * lisp/url.el (url-retrieve-synchronously): Use sleep-for, not
+ * url.el (url-retrieve-synchronously): Use sleep-for, not
sit-for. From monnier@gnu.org.
2002-11-04 Walter C. Pelissero <walter@pelissero.org>
- * lisp/url-methods.el (url-scheme-register-proxy): Make sure to convert
+ * url-methods.el (url-scheme-register-proxy): Make sure to convert
port numbers to integers when creating the URL objects for proxies.
2002-10-29 William M. Perry <wmperry@gnu.org>
- * lisp/url-http.el (url-http-parse-headers): When doing a
+ * url-http.el (url-http-parse-headers): When doing a
redirect, some broken software (sourceforge) sends a redirect to
'/', which is blatantly illegal (see section 14.30 of the HTTP/1.1
specification). I wish we could deal with such lame software
@@ -1885,13 +2097,13 @@
2002-10-27 William M. Perry <wmperry@gnu.org>
- * lisp/url-http.el (url-http-create-request): If we are talking to
+ * url-http.el (url-http-create-request): If we are talking to
the default port for a the selected protocol, do NOT send the port
in the HOST header. This fixes the login page at sourceforge.
2002-09-17 William M. Perry <wmperry@gnu.org>
- * lisp/url-http.el (url-http-handle-cookies): New function to deal
+ * url-http.el (url-http-handle-cookies): New function to deal
with cookie headers.
(url-http-parse-headers): Call `url-http-handle-cookies' here so
that cookie additions and deletions get handled immediately.
@@ -1903,67 +2115,56 @@
methods to GET in redirects. Too many web sites do this now, and
it is just likely to confuse users.
-2002-05-17 Dave Love <fx@gnu.org>
-
- * texi/url.txi: Start making it vaguely useful.
-
- * texi/Makefile.in (install): Cope with Debian install-info.
- From Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Grossjohann).
-
2002-04-22 Dave Love <fx@gnu.org>
- * lisp/url-misc.el (man): Autoload to avoid warning.
+ * url-misc.el (man): Autoload to avoid warning.
(url-man): Don't require man here.
(url-data): Generalize in line with the RFC.
- * lisp/url-gw.el (url-open-stream): Remove obsolete `tcp' case.
+ * url-gw.el (url-open-stream): Remove obsolete `tcp' case.
- * lisp/url-vars.el: Doc fixes.
+ * url-vars.el: Doc fixes.
(url-mime-charset-string): New function.
(url-mime-charset-string): Use it to set the variable.
(url-set-mime-charset-string): New function.
(set-language-environment-hook): Use it.
(url-vars-unload-hook): New function.
- * lisp/url-cookie.el (url-header-comparison): Delete.
+ * url-cookie.el (url-header-comparison): Delete.
(url-cookie-handle-set-cookie): Use assoc-ignore-case to avoid assoc*.
(url-cookie-save-interval): Make value agree with doc.
- * lisp/url.el: Doc fixes.
+ * url.el: Doc fixes.
(url-mm-callback): Don't call mm-destroy-parts immediately for
external viewing -- set up a process sentinel.
-2002-02-02 William M. Perry <wmperry@gnu.org>
-
- * lisp/Makefile.in (SOURCES): Remove mule-sysdp.el from the build rules.
-
2001-12-12 William M. Perry <wmperry@gnu.org>
- * lisp/url-vars.el (url-nonrelative-link): Patch from Stefan
+ * url-vars.el (url-nonrelative-link): Patch from Stefan
Monnier to use ` instead of ^ to match the relative link.
2001-12-10 William M. Perry <wmperry@gnu.org>
- * lisp/url-dav.el (url-dav-file-attributes): Fix bad call to
+ * url-dav.el (url-dav-file-attributes): Fix bad call to
plist-get (reversed args).
- * lisp/url-file.el (url-file-build-filename): Make sure that we
+ * url-file.el (url-file-build-filename): Make sure that we
have a parsed URL in this function.
2002-01-22 Dave Love <fx@gnu.org>
- * lisp/url-cache.el (url-cache-file-writable-p): Doc fix.
+ * url-cache.el (url-cache-file-writable-p): Doc fix.
- * lisp/url-imap.el (url-imap): Maybe disable multibyte.
+ * url-imap.el (url-imap): Maybe disable multibyte.
Bind coding-system-for-read. Require mm-util.
- * lisp/url.el (url-do-setup): Use (featurep 'xemacs).
+ * url.el (url-do-setup): Use (featurep 'xemacs).
- * lisp/mule-sysdp.el: Removed (obsolete).
+ * mule-sysdp.el: Removed (obsolete).
2001-12-09 William M. Perry <wmperry@gnu.org>
- * lisp/url-dav.el (url-dav-delete-something): Utility macro to
+ * url-dav.el (url-dav-delete-something): Utility macro to
remove an arbitrary resource.
(url-dav-delete-directory): Use it.
(url-dav-delete-file): Ditto.
@@ -1976,14 +2177,14 @@
2001-12-08 William M. Perry <wmperry@gnu.org>
- * lisp/url-dav.el (url-dav-directory-files): New function to
+ * url-dav.el (url-dav-directory-files): New function to
mimic `directory-files' for WebDAV.
(url-dav-delete-directory): New function to mimic
`delete-directory' for WebDAV.
2001-12-06 William M. Perry <wmperry@gnu.org>
- * lisp/url-dav.el (url-dav-process-DAV:locktoken): Parse the
+ * url-dav.el (url-dav-process-DAV:locktoken): Parse the
DAV:locktoken hrefs into a usable format.
(url-dav-process-response): Use an unwind-protect to make sure
that we clean up the buffer, even if there is a parsing error.
@@ -2006,23 +2207,23 @@
using the PUT method. I can now successfully save files to an
HTTP server with some manual steps from a lisp-interaction buffer.
- * lisp/url-http.el (url-http-wait-for-headers-change-function):
+ * url-http.el (url-http-wait-for-headers-change-function):
Special case the 204/205 response codes. Some servers do not
send back a 0 content-length for these, and we would hang.
(url-http-parse-headers): Mark 204/205 response codes as
'successful' so that the callbacks get activated.
(url-http-options): Fix unbound variable usage.
- * lisp/url-dav.el: Added full copyright information.
+ * url-dav.el: Added full copyright information.
(url-dav-process-response): Make sure that we create a DAV:status
property when parsing a singleton response.
(url-dav-file-attributes): If the properties returned did not have
a successful HTTP response code, then ignore them and use the
HEAD-based attributes.
- * lisp/vc-dav.el: Added full copyright information.
+ * vc-dav.el: Added full copyright information.
- * lisp/url-dav.el (url-dav-process-supportedlock-property):
+ * url-dav.el (url-dav-process-supportedlock-property):
Deal with text nodes in DAV:supportedlock nodes.
(url-dav-file-attributes-mode-string): This now gets the entire
property list instead of just the DAV:supportedlock node.
@@ -2077,18 +2278,18 @@
2001-12-05 William M. Perry <wmperry@gnu.org>
- * lisp/url-dav.el (url-dav-get-properties): New argument
+ * url-dav.el (url-dav-get-properties): New argument
ATTRIBUTES that allows you to ask for specific properties instead
of getting all properties via DAV:allprop.
- * lisp/url-http.el (url-http-real-basic-auth-storage):
+ * url-http.el (url-http-real-basic-auth-storage):
New variable for normal HTTP basic authentication.
(url-http-proxy-basic-auth-storage): New variable for HTTP proxy
basic authentication.
(url-http-handle-authentication): Follow new semantics for
url-basic-auth-storage.
- * lisp/url-auth.el (url-basic-auth-storage): Change meaning of
+ * url-auth.el (url-basic-auth-storage): Change meaning of
this variable. It is now a symbol pointing to where we really
want to store the authorization information. This fixes proxy
auth and normal basic auth because of some local bindings that were
@@ -2096,13 +2297,13 @@
(url-basic-auth): Make sure we dereference url-basic-auth-storage
everywhere.
- * lisp/url-util.el (url-debug): Add new types 'dav and
+ * url-util.el (url-debug): Add new types 'dav and
'retrieval to the customization list.
- * lisp/url.el (url-retrieve-synchronously): Put in some debugging
+ * url.el (url-retrieve-synchronously): Put in some debugging
statements.
- * lisp/url-http.el (url-http-head-file-attributes): Rename old
+ * url-http.el (url-http-head-file-attributes): Rename old
url-http-file-attributes so that we can have a smarter one that
tries WebDAV first, then HEAD.
(url-http-file-attributes): New smart version that tries WebDAV first.
@@ -2119,7 +2320,7 @@
data. Otherwise we can deadlock if the headers and the entire
body exist arrive in one chunk.
- * lisp/url-dav.el: New file to contain the WebDAV
+ * url-dav.el: New file to contain the WebDAV
(http://www.webdav.org/) implementation.
(url-dav-supported-p): Cheap way to figure out whether we will be
able to do DAV at all. We rely on the XML parser expanding
@@ -2142,7 +2343,7 @@
2001-12-04 William M. Perry <wmperry@gnu.org>
- * lisp/url-handlers.el (file-name-absolute-p): New hooked
+ * url-handlers.el (file-name-absolute-p): New hooked
version. If the filename matches our regexp, then it is always
absolute, so just return `t'.
(expand-file-name): New hooked version. If the fragment is an
@@ -2151,30 +2352,30 @@
want the file-name-handlers to work off of.
(url-setup-file-name-handlers): Use it when installing the handlers.
- * lisp/url-http.el (url-http-find-free-connection): Better logging
+ * url-http.el (url-http-find-free-connection): Better logging
about whether we are reusing an existing connection or not.
- * lisp/url-methods.el (url-scheme-register-proxy): Fix bad call
+ * url-methods.el (url-scheme-register-proxy): Fix bad call
to string-match instead of match-string (and with reversed
arguments even).
- * lisp/url-http.el (url-http-debug): Change to now use the
+ * url-http.el (url-http-debug): Change to now use the
generic url-debug function to do the actual logging. Still a
separate function so that we can do our magic on the network
connection if the user quits while we are downloading.
- * lisp/url-handlers.el (url-file-handler): Now logs the result of
+ * url-handlers.el (url-file-handler): Now logs the result of
the hooked or real call.
- * lisp/url-util.el (url-debug): New function for generic debug logging.
+ * url-util.el (url-debug): New function for generic debug logging.
2001-11-28 William M. Perry <wmperry@gnu.org>
- * lisp/url-imap.el (url-imap-open-host): Use backquote.
+ * url-imap.el (url-imap-open-host): Use backquote.
(url-imap): Now switches to 'login as the imap authenticator if
the URL provides a username and password.
- * lisp/url-handlers.el (url-setup-file-name-handlers): Use cl &
+ * url-handlers.el (url-setup-file-name-handlers): Use cl &
push to replace some strange logic in here.
(url-run-real-handler): New function to run the real hooks in
case we get a false positive or an operation that we do not
@@ -2197,7 +2398,7 @@
2001-11-26 William M. Perry <wmperry@gnu.org>
- * lisp/url-handlers.el (file-writable-p): Add NULL handler for
+ * url-handlers.el (file-writable-p): Add NULL handler for
this so that visiting a URL directly will work.
(file-symlink-p): Ditto.
(url-insert-file-contents): If `visit' is non-nil then make sure
@@ -2208,16 +2409,16 @@
2001-11-25 William M. Perry <wmperry@gnu.org>
- * lisp/url-util.el (url-hexify-string): Fix bad use of mapconcat.
+ * url-util.el (url-hexify-string): Fix bad use of mapconcat.
2001-11-24 William M. Perry <wmperry@gnu.org>
- * lisp/url-about.el (url-about): New loader scheme to handle
+ * url-about.el (url-about): New loader scheme to handle
about:foo URLs. Automatically tries to find a `url-about-foo'
function to display the actual data.
(url-about-protocols): Implement about:protocols.
- * lisp/url-http.el (url-http): Make sure that we signal an error
+ * url-http.el (url-http): Make sure that we signal an error
when we cannot open a network connection for whatever reason.
Before, it would just silently clean up after itself and the user
got absolutely no indication that an error had occurred. If the
@@ -2228,13 +2429,13 @@
2001-11-22 William M. Perry <wmperry@gnu.org>
- * lisp/url-https.el: Fixed definition of url-https - was using the
+ * url-https.el: Fixed definition of url-https - was using the
wrong signature. Too much cut & paste.
(url-https-create-secure-wrapper): Fix so that url-https works
at all. Was not taking a null `method' into account when calling
the wrapped function so url-https tried to call url-http-nil. *sigh*
- * lisp/url-http.el
+ * url-http.el
(url-http-chunked-encoding-after-change-function): Add some
feedback when not debugging about what content-type and chunk # we
are reading.
@@ -2249,7 +2450,7 @@
2001-11-21 William M. Perry <wmperry@gnu.org>
- * lisp/url-http.el (url-http-debug): Document this variable.
+ * url-http.el (url-http-debug): Document this variable.
People other than I might want to use it.
(url-http-debug): Put some code in here to check quit-flag
directly. When the chunked encoding went into a tight spin, your
@@ -2274,10 +2475,10 @@
url-http-chunked-encoding-after-change-function. It is no longer
needed. I should use my brain sometime.
- * lisp/url-vars.el (and): Fix feature test for xemacs and
+ * url-vars.el (and): Fix feature test for xemacs and
coding-system-list behavior.
- * lisp/url-http.el
+ * url-http.el
(url-http-chunked-encoding-after-change-function): Add optional
no-initial-crlf flag that modifies the regular expression.
This is only set from url-http-wait-for-headers-change-function so that
@@ -2300,78 +2501,78 @@
2001-10-11 Dave Love <fx@gnu.org>
- * lisp/url-handlers.el: Doc fixes.
+ * url-handlers.el: Doc fixes.
(string-match): Use (featurep 'xemacs).
- * lisp/url-methods.el (url-scheme-get-property): Avoid `mapc'.
+ * url-methods.el (url-scheme-get-property): Avoid `mapc'.
- * lisp/url-proxy.el (url-find-proxy-for-url): Avoid `pop'.
+ * url-proxy.el (url-find-proxy-for-url): Avoid `pop'.
- * lisp/url-vars.el (url-running-xemacs): Delete.
+ * url-vars.el (url-running-xemacs): Delete.
(url-gateway-unplugged): New variable.
- * lisp/url-gw.el (url-open-stream): Use url-gateway-unplugged.
+ * url-gw.el (url-open-stream): Use url-gateway-unplugged.
Comment out OS/2 stuff.
2001-10-05 Dave Love <fx@gnu.org>
- * lisp/url-mailto.el (url-mailto): Don't send auto-generated mail
+ * url-mailto.el (url-mailto): Don't send auto-generated mail
without confirmation.
2001-10-02 Dave Love <fx@gnu.org>
- * lisp/url-http.el (url-http-create-request): Check cache for
+ * url-http.el (url-http-create-request): Check cache for
proxy-obj, if defined, rather than url.
(url-http): Use dolist, not mapc (runtime cl dependency).
- * lisp/url-methods.el: Maybe require cl at runtime.
+ * url-methods.el: Maybe require cl at runtime.
(url-scheme-register-proxy): Fix fetching from environment.
Don't concat a number.
2001-10-01 Dave Love <fx@gnu.org>
- * lisp/url-parse.el: Use modern backquote syntax.
+ * url-parse.el: Use modern backquote syntax.
- * lisp/url-vars.el (url-uncompressor-alist): Add bzip2.
+ * url-vars.el (url-uncompressor-alist): Add bzip2.
(url-mail-command): Prefer compose-mail.
(tcp-binary-process-input-services): Comment out.
(url-working-buffer): New constant.
- * lisp/url-util.el (url-extract-mime-headers): New function.
+ * url-util.el (url-extract-mime-headers): New function.
- * lisp/url-mailto.el (url-mailto): Set source-url. Don't add
+ * url-mailto.el (url-mailto): Set source-url. Don't add
User-Agent.
2001-09-20 Dave Love <fx@gnu.org>
- * lisp/url-http.el (url-http-create-request): Don't concat a number.
+ * url-http.el (url-http-create-request): Don't concat a number.
2001-06-05 Dave Love <fx@gnu.org>
- * lisp/url.el (url-do-setup): Doc fix. Don't try to frob
+ * url.el (url-do-setup): Doc fix. Don't try to frob
tcp-binary-process-input-services. Remove function wrapper for lambda.
(url-retrieve): Barf with sensible message if url-type is null.
- * lisp/url-http.el (url-http): Don't try to set process
+ * url-http.el (url-http): Don't try to set process
coding-system here -- done in url-gw.
- * lisp/url-gw.el (url-gw-inhibit-code-conversion): Remove.
+ * url-gw.el (url-gw-inhibit-code-conversion): Remove.
(url-open-stream): Bind coding-system-for{read,write} when setting
up the connection. Don't call url-gw-inhibit-code-conversion.
2001-05-24 William M. Perry <wmperry@gnu.org>
- * lisp/url.el (url-retrieve-synchronously): Avoid accept-process-output
+ * url.el (url-retrieve-synchronously): Avoid accept-process-output
in url-retrieve-synchronously.
2001-05-23 William M. Perry <wmperry@gnu.org>
- * lisp/url.el (url-retrieve-synchronously): Don't put a timeout on
+ * url.el (url-retrieve-synchronously): Don't put a timeout on
accept-process-output. This is evidently causing hangs in Emacs
21 when viewing complex pages with images or stylesheets.
www.yahoo.com is now viewable.
- * lisp/url-gw.el (url-open-stream): Avoid using mule-sysdp
+ * url-gw.el (url-open-stream): Avoid using mule-sysdp
(mule-inhibit-code-conversion) and just have a local function that
does this minimal cruft.
(url-gw-inhibit-code-conversion): New function to turn off code
@@ -2379,7 +2580,7 @@
2001-05-22 William M. Perry <wmperry@gnu.org>
- * lisp/url.el (url-retrieve-synchronously): Use lexical-let so
+ * url.el (url-retrieve-synchronously): Use lexical-let so
that we can allow multiple asynch retrievals to happen at once.
(url-retrieve-synchronously): Use a much smaller timeout when
doing the accept-process-output. This gets rid of the long delays
@@ -2390,39 +2591,39 @@
(url-retrieve): Ditto.
(url-mm-url): Ditto.
- * lisp/url-vars.el: Replaced `HTTP/1.0' with just `HTTP' in some
+ * url-vars.el: Replaced `HTTP/1.0' with just `HTTP' in some
documentation strings. Ok, so I'm anal.
- * lisp/url-methods.el (url-scheme-methods): Add default methods
+ * url-methods.el (url-scheme-methods): Add default methods
for file-directory-p and file-truename.
2001-05-22 Dave Love <fx@gnu.org>
- * lisp/url-auth.el (url-warn): Autoload.
+ * url-auth.el (url-warn): Autoload.
- * lisp/url-proxy.el (url-warn): Autoload.
+ * url-proxy.el (url-warn): Autoload.
- * lisp/url-nfs.el: Fix `file-truname' typo.
+ * url-nfs.el: Fix `file-truname' typo.
- * lisp/url-news.el: Require cl when compiling.
+ * url-news.el: Require cl when compiling.
(url-warn, gnus-group-read-ephemeral-group): Autoload.
(url-nntp-default-port, url-news-default-port, url-nntp): Delete.
(url-news-fetch-newsgroup): Declare gnus-group-buffer special.
- * lisp/url-util.el (mule-decode-string): Don't autoload.
+ * url-util.el (mule-decode-string): Don't autoload.
(url-hexify-string): Just barf on multibyte characters.
(url-generate-unique-filename): New function.
- * lisp/url-file.el (url-file): Use url-generate-unique-filename,
+ * url-file.el (url-file): Use url-generate-unique-filename,
not mm-generate-unique-filename.
- * lisp/url-http.el: Declare things special in various places.
+ * url-http.el: Declare things special in various places.
(url-http-activate-callback): Don't set
url-http-real-after-change-function.
2001-05-22 William M. Perry <wmperry@gnu.org>
- * lisp/url-http.el (url-http-attempt-keepalives): New variable to
+ * url-http.el (url-http-attempt-keepalives): New variable to
control whether we try to do keep-alives for our connections.
(url-http-version): New variable to control whether we advertise
ourselves as an HTTP/1.1 client or not. This can be useful for
@@ -2432,13 +2633,13 @@
2001-05-21 Dave Love <fx@gnu.org>
- * lisp/url-vars.el (mm-mime-mule-charset-alist): Don't readjust it
+ * url-vars.el (mm-mime-mule-charset-alist): Don't readjust it
in XEmacs.
(url-mime-charset-string): Don't reverse the list before sorting.
2001-05-17 William M. Perry <wmperry@gnu.org>
- * lisp/url-http.el (url-http-generic-filter): Avoid using
+ * url-http.el (url-http-generic-filter): Avoid using
after-change-functions natively. There are just too many ways
that this screws up in Emacs 21. Use a filter function on the
process instead, and call the hook on
@@ -2446,111 +2647,111 @@
in Emacs 21, but one problem that has been fixed in Emacs 21
exists in Emacs 20. -- fx]
- * lisp/url-vars.el (url-mime-charset-string): sort-coding-systems
+ * url-vars.el (url-mime-charset-string): sort-coding-systems
does not exist on older versions of Emacs, or any version of
XEmacs. Do not call it unless it is bound.
2001-05-17 Dave Love <fx@gnu.org>
- * lisp/url-http.el (url-http-create-request): Fix non-GET requests.
+ * url-http.el (url-http-create-request): Fix non-GET requests.
2001-05-16 Dave Love <fx@gnu.org>
- * lisp/url-vars.el: Doc fixes. Require mm-util.
+ * url-vars.el: Doc fixes. Require mm-util.
(url-mime-charset-string): New variable.
- * lisp/url-http.el: Doc fixes.
+ * url-http.el: Doc fixes.
(url-http-create-request): Rearrange how we assemble the request.
Avoid generating bogus requests with an empty real-fname.
(url-http-handle-authentication): Declare status and success special.
(url-http): Call mm-disable-multibyte. Set process buffer's
coding systems to binary.
- * lisp/url-misc.el (url-data): Call mm-disable-multibyte.
+ * url-misc.el (url-data): Call mm-disable-multibyte.
- * lisp/url-file.el: Don't require mule-sysdp. Fix `file-truname' typo.
+ * url-file.el: Don't require mule-sysdp. Fix `file-truname' typo.
(url-file-find-possibly-compressed-file): Doc fix.
(url-file): Bind coding-system-for-read. Call mm-disable-multibyte.
- * lisp/url-cache.el: Don't require mule-sysdp.
+ * url-cache.el: Don't require mule-sysdp.
(url-store-in-cache): Avoid mule-write-region-no-coding-system.
- * lisp/url.el: Don't require mule-sysdp.
+ * url.el: Don't require mule-sysdp.
(url-retrieve): Only set text properties if url is a string.
2001-05-14 Dave Love <fx@gnu.org>
- * lisp/url-http.el (url-http-create-request):
+ * url-http.el (url-http-create-request):
Declare proxy-object, proxy-info special.
(url-http-handle-authentication): Declare success special.
2001-05-12 Dave Love <fx@gnu.org>
- * lisp/url-http.el: Revert last change.
+ * url-http.el: Revert last change.
2001-05-10 Dave Love <fx@gnu.org>
- * lisp/url-http.el (url-http-generic-after-change-function):
+ * url-http.el (url-http-generic-after-change-function):
Make it permanent-local.
2001-05-05 Dave Love <fx@gnu.org>
- * lisp/url-http.el: Autoload some functions.
+ * url-http.el: Autoload some functions.
(cl): Require when compiling.
(url-http-extra-headers): Defvar when compiling.
(url-http): Treat after-change-functions as a local hook.
- * lisp/url-history.el (url-parse): Require.
+ * url-history.el (url-parse): Require.
(url-do-setup): Autoload.
- * lisp/url-gw.el: Require url-vars. Autoload some functions.
+ * url-gw.el: Require url-vars. Autoload some functions.
- * lisp/url-file.el: Require mailcap. Require cl when compiling.
+ * url-file.el: Require mailcap. Require cl when compiling.
Use (featurep 'xemacs).
(url-file-build-filename): Bind pos-index.
(url-file): Call url-find-file-dired, not url-dired-find-file.
- * lisp/url-dired.el: Add copyright notice. Autoload some functions.
+ * url-dired.el: Add copyright notice. Autoload some functions.
(url-dired-minor-mode-map): Use (featurep 'xemacs).
(url-dired-find-file-mouse): Use mouse-set-point, not event-point.
(url-find-file-dired): Rename from one version of url-dired-find-file.
- * lisp/url-cid.el: Don't require widget. Require mm-decode
+ * url-cid.el: Don't require widget. Require mm-decode
unconditionally.
- * lisp/url-util.el: Autoload mule-decode-string,
+ * url-util.el: Autoload mule-decode-string,
timezone-parse-date, timezone-make-date-arpa-standard.
(url-unreserved-chars): Fix list per RFC 2396.
(url-hexify-string): Maybe string-make-unibyte.
- * lisp/url-news.el: Require nntp.
+ * url-news.el: Require nntp.
- * lisp/url-imap.el: Require cl when compiling. Require nnimap
+ * url-imap.el: Require cl when compiling. Require nnimap
unconditionally.
2001-05-04 Dave Love <fx@gnu.org>
- * lisp/url-handlers.el (url-file-local-copy): Use make-temp-file,
+ * url-handlers.el (url-file-local-copy): Use make-temp-file,
not non-existent mailcap-generate-unique-filename.
- * lisp/url-privacy.el: Require url-vars. Require cl when compiling.
+ * url-privacy.el: Require url-vars. Require cl when compiling.
- * lisp/url-parse.el: Require url-vars.
+ * url-parse.el: Require url-vars.
Autoload url-scheme-get-property.
- * lisp/url-nfs.el: Require cl when compiling. Test for XEmacs
+ * url-nfs.el: Require cl when compiling. Test for XEmacs
with featurep.
- * lisp/url-mailto.el: Require cl when compiling.
+ * url-mailto.el: Require cl when compiling.
- * lisp/url-cookie.el (url-cookie-handle-set-cookie):
+ * url-cookie.el (url-cookie-handle-set-cookie):
Call url-parse-args, not url-util-parse-args.
- * lisp/url-cache.el (url-cache-expired): Remove bogus `return'.
+ * url-cache.el (url-cache-expired): Remove bogus `return'.
2001-04-09 Dave Love <fx@gnu.org>
- * lisp/mule-sysdp.el (mule-detect-coding-version)
+ * mule-sysdp.el (mule-detect-coding-version)
(mule-code-convert-region, mule-inhibit-code-conversion)
(mule-write-region-no-coding-system, mule-encode-string)
(mule-decode-string, mule-truncate-string)
@@ -2561,109 +2762,106 @@
2001-01-03 Sam Steingold <sds@gnu.org>
- * lisp/url-http.el (url-http-wait-for-headers-change-function):
+ * url-http.el (url-http-wait-for-headers-change-function):
set `url-http-end-of-headers' to 0 for HTTP 0.9.
2001-01-02 Sam Steingold <sds@gnu.org>
- * lisp/url-auth.el (provide): `url-auth', not `urlauth'.
+ * url-auth.el (provide): `url-auth', not `urlauth'.
2000-12-22 Dave Love <fx@gnu.org>
- * lisp/url-history.el (url): Don't require (to avoid recursion).
+ * url-history.el (url): Don't require (to avoid recursion).
(cl): Require when compiling.
- * lisp/url-http.el (url-auth): Require.
+ * url-http.el (url-auth): Require.
(url-http-handle-authentication): Fix typo.
- * lisp/url-cookie.el (url-cookie-setup-save-timer): Fix typo.
+ * url-cookie.el (url-cookie-setup-save-timer): Fix typo.
2000-12-20 Dave Love <fx@gnu.org>
- * lisp/url.el: Require mm-decode, mm-view when compiling.
+ * url.el: Require mm-decode, mm-view when compiling.
<not (fboundp 'puthash)>: Define puthash and
autoload other has functions rather than using cl-...hash.
(url-warn): Define.
- * lisp/url-ns.el, lisp/url-methods.el, lisp/url-http.el:
+ * url-ns.el, url-methods.el, url-http.el:
Avoid cl-...hash functions.
- * lisp/url-history.el: Avoid cl-...hash functions.
+ * url-history.el: Avoid cl-...hash functions.
(url): Require.
- * lisp/url-gw.el, lisp/url-cookie.el: Require cl only when compiling.
+ * url-gw.el, url-cookie.el: Require cl only when compiling.
2000-10-03 William M. Perry <wmperry@aventail.com>
- * lisp/url-util.el (url-get-url-at-point): Guard against 'url'
+ * url-util.el (url-get-url-at-point): Guard against 'url'
getting set to nil due to bad string matching. Subsequent matches
would then choke because we passed string-match a nil.
- * lisp/url-http.el (url-http-parse-headers): Need to make the
+ * url-http.el (url-http-parse-headers): Need to make the
connection as 'free' when we get a 304 response (found in cache),
or when a keep-alive connection timed out, it would re-parse the
headers and dispatch to the callback again. Eek.
2000-10-02 William M. Perry <wmperry@aventail.com>
- * lisp/url-http.el (url-http-chunked-encoding-after-change-function):
+ * url-http.el (url-http-chunked-encoding-after-change-function):
implement chunked transfer-coding.
(url-http-create-request): We can now advertise ourselves as a 1.1
compliant browser!
2000-07-28 Sam Steingold <sds@gnu.org>
- * lisp/url-methods.el (url-scheme-default-loader): `callback' and
+ * url-methods.el (url-scheme-default-loader): `callback' and
`cbargs' are optional args (for calling from w3).
(url-scheme-register-proxy): Typos fixes: `url-match' replaced
with `string-match' and `protocol' with `scheme'.
2000-07-18 Sam Steingold <sds@gnu.org>
- * lisp/url-handlers.el (require 'url): For url-retrieve-synchronously.
- * lisp/url-history.el (url-history-save-interval): Avoid circularity.
+ * url-handlers.el (require 'url): For url-retrieve-synchronously.
+ * url-history.el (url-history-save-interval): Avoid circularity.
2000-07-10 William M. Perry <wmperry@aventail.com>
- * lisp/mule-sysdp.el (mule-make-iso-character): If we are not in
+ * mule-sysdp.el (mule-make-iso-character): If we are not in
mule, and the character requested is > 255, then return "~"
instead of letting whoever call us signal an error when they try
to insert the character.
(mule-make-iso-character): Also wrap the whole thing in a
condition case and return "~" on error, in case make-char bombs on us.
- * lisp/url-cid.el (url-cid): Fix stupid mistake in the loader
+ * url-cid.el (url-cid): Fix stupid mistake in the loader
for cid parts.
- * lisp/url-util.el (url-display-percentage): New routine that uses
+ * url-util.el (url-display-percentage): New routine that uses
the progress bar under XEmacs if available. Looks very sexy under
XEmacs/GTK hacked to use the GNOME statusbar.
- * lisp/url-http.el
+ * url-http.el
(url-http-content-length-after-change-function): Use new function
url-display-percentage instead of url-lazy-message.
2000-01-27 William M. Perry <wmperry@aventail.com>
- * lisp/url-file.el (url-file-build-filename): Work around for
+ * url-file.el (url-file-build-filename): Work around for
differences in ange-ftp / efs handling of port numbers other than 21.
1999-12-24 William M. Perry <wmperry@aventail.com>
- * lisp/url-irc.el: Added pointer to draft specification for the
+ * url-irc.el: Added pointer to draft specification for the
IRC URL so people don't think I'm crazy.
- * configure.in: Checks to make sure that Gnus was found, since we
- HAVE to have it now. Removed conditional compilation of url-cid.el.
-
1999-12-16 Eric Marsden <emarsden@mail.dotcom.fr>
- * lisp/url-util.el (url-get-url-at-point): Allow URLs wrapped in
+ * url-util.el (url-get-url-at-point): Allow URLs wrapped in
() to have periods at the end of the chunk.
1999-12-14 William M. Perry <wmperry@aventail.com>
- * lisp/url-misc.el (url-man): Implement `man' URL types.
+ * url-misc.el (url-man): Implement `man' URL types.
(url-info): Autoload.
(url-man): Ditto.
(url-rlogin): Ditto.
@@ -2671,14 +2869,14 @@
(url-tn3270): Ditto.
(url-generic-emulator-loader): Ditto.
- * lisp/url-https.el (url-https-create-secure-wrapper): New macro
+ * url-https.el (url-https-create-secure-wrapper): New macro
to wrap arbitrary `http' methods with the appropriate magic to
turn SSL on.
(file-exists-p): Use it.
(file-readable-p): Use it.
(file-attributes): Use it.
- * lisp/url-news.el (url-news-fetch-newsgroup): When building the
+ * url-news.el (url-news-fetch-newsgroup): When building the
server spec for Gnus, make sure we set
nntp-open-connection-function directly, so that other news-related
functions above us can set it.
@@ -2689,7 +2887,7 @@
1999-12-12 William M. Perry <wmperry@aventail.com>
- * lisp/url-http.el (url-http-parse-response): New function to
+ * url-http.el (url-http-parse-response): New function to
parse just the HTTP response code out of the buffer, without
taking any other actions.
(url-http-wait-for-headers-change-function): Use it here when we
@@ -2701,161 +2899,151 @@
1999-12-11 William M. Perry <wmperry@aventail.com>
- * aclocal.m4 (AC_CHECK_CUSTOMLOADS): Don't use $(EMACS) in here -
- the Makefile does that for us. We just need to provide what files
- to load/functions to run.
-
- * lisp/url-imap.el (url-imap-open-host): Need to bind
+ * url-imap.el (url-imap-open-host): Need to bind
nnimap-server-buffer or `nnimap-open-server' chokes trying to use
the current buffer as the IMAP server buffer, which fails miserably.
1999-12-11 Simon Josefsson <jas@pdc.kth.se>
- * lisp/url-imap.el: Initial (rough) implementation for IMAP urls.
+ * url-imap.el: Initial (rough) implementation for IMAP urls.
1999-12-11 William M. Perry <wmperry@aventail.com>
- * lisp/url-file.el (url-file-asynch-callback): Make the checks for
+ * url-file.el (url-file-asynch-callback): Make the checks for
ange-ftp vs. efs calling semantics consistent, so that if someone
has NEITHER of them loaded, everything should still work.
- * lisp/url-handlers.el (url-copy-file): Autoload.
+ * url-handlers.el (url-copy-file): Autoload.
(url-file-local-copy): Ditto.
(url-insert-file-contents): Ditto.
(url-setup-file-name-handlers): Ditto.
1999-12-10 William M. Perry <wmperry@aventail.com>
- * lisp/url-http.el (mail-parse): Since we use functions from here,
+ * url-http.el (mail-parse): Since we use functions from here,
we should require it, eh?
1999-12-10 Shenghuo ZHU <zsh@cs.rochester.edu>
- * lisp/url-cookie.el (url-cookie-multiple-line): One line cookie
+ * url-cookie.el (url-cookie-multiple-line): One line cookie
if nil.
(url-cookie-generate-header-lines): Use it.
1999-12-06 William M. Perry <wmperry@aventail.com>
- * lisp/mule-sysdp.el (mule-code-convert-region): Deal with Mule
+ * mule-sysdp.el (mule-code-convert-region): Deal with Mule
4.1 gracefully.
- * lisp/url-news.el: Reimplemented news and nntp URL support.
+ * url-news.el: Reimplemented news and nntp URL support.
No longer bothers to check for outdated Gnus versions, since this
will not work without them anyway.
1999-12-05 Dave Love <fx@gnu.org>
- * lisp/url-methods.el, lisp/url-proxy.el, lisp/url-util.el,
- lisp/url.el:
+ * url-methods.el, url-proxy.el, url-util.el,
+ url.el:
Require url-parse.
1999-12-05 William M. Perry <wmperry@aventail.com>
- * lisp/url-http.el (url-http-find-free-connection): Spit out a
+ * url-http.el (url-http-find-free-connection): Spit out a
message when we have to contact a host so the user always gets
at least some feedback.
- * lisp/url-expand.el (url-expander-remove-relative-links): Move and
+ * url-expand.el (url-expander-remove-relative-links): Move and
renamed function.
(url-default-expander): Use it.
- * lisp/url-file.el (url-file-asynch-callback): Deal with just efs-auto
+ * url-file.el (url-file-asynch-callback): Deal with just efs-auto
as well as efs.
(url-file): Add default content-type of application/octet-stream if
none known.
(url-file): Correct bad call to url-host-is-local-p.
- * lisp/url-handlers.el (url-insert-file-contents): Emacs doesn't
+ * url-handlers.el (url-insert-file-contents): Emacs doesn't
like buffer-substring with nil arguments.
(url-copy-file): Use mm-destroy-parts instead of just killing
the buffer. Use defined interfaces when available!
(url-insert-file-contents): Ditto.
- * lisp/url-http.el (url-http-create-request): Lots of changes to
+ * url-http.el (url-http-create-request): Lots of changes to
get proxying working.
- * lisp/url-methods.el (url-scheme-register-proxy): New function to
+ * url-methods.el (url-scheme-register-proxy): New function to
find and register a proxy for a specific scheme.
(url-scheme-get-property): Use it when we load a URL scheme for
the first time.
- * lisp/url-util.el (url-get-url-at-point): Re-integrated.
+ * url-util.el (url-get-url-at-point): Re-integrated.
1999-12-04 William M. Perry <wmperry@aventail.com>
- * lisp/url-file.el (url-file): Signal an error if
+ * url-file.el (url-file): Signal an error if
url-file-build-filename could not find the filename.
1999-12-01 William M. Perry <wmperry@aventail.com>
- * lisp/url.el (url-retrieve): Use url-history-update-url instead
+ * url.el (url-retrieve): Use url-history-update-url instead
of manipulating the hash table directly.
- * lisp/url-history.el (url-completion-function): New function to
+ * url-history.el (url-completion-function): New function to
use for reading a URL with completion.
(url-history-update-url): New function to hide the hashtable
implementation from people inserting things into the history.
1999-11-30 William M. Perry <wmperry@aventail.com>
- * lisp/url-proxy.el (url-proxy): Minor tweaks to get proxy support
+ * url-proxy.el (url-proxy): Minor tweaks to get proxy support
working.
- * lisp/url-parse.el (url-generic-parse-url): Fix bad call to
+ * url-parse.el (url-generic-parse-url): Fix bad call to
url-parse-args, which had changed the type of arguments it expects.
- * lisp/url-handlers.el (url-insert-file-contents): Ditto.
+ * url-handlers.el (url-insert-file-contents): Ditto.
(url-copy-file): Ditto.
- * lisp/url.el (url-mm-callback): Use mm-destroy-parts instead of
+ * url.el (url-mm-callback): Use mm-destroy-parts instead of
just killing the buffer. Use defined interfaces when available!
- * aclocal.m4 (AC_EMACS_LISP): Correctly redirect things out to
- AC_FD_CC so they show up in config.log
- (AC_EMACS_CHECK_LIB): Duh, fixed stupid mistake that would make
- this always return 't' instead of 'yes' on successfully finding
- the library.
-
- * lisp/url-http.el (url-http-parse-headers): Add some
+ * url-http.el (url-http-parse-headers): Add some
DAV-specific error codes.
- * lisp/url.el (url-retrieve): Allow pre-parsed URLs to be passed in.
+ * url.el (url-retrieve): Allow pre-parsed URLs to be passed in.
(url-retrieve-synchronously): Duh, make this function actually
work again. Numerous problems with it, including variable name
collisions - I love dynamically scoped lisps!
- * lisp/url-nfs.el (url-nfs-create-wrapper): New function to create
+ * url-nfs.el (url-nfs-create-wrapper): New function to create
wrappers onto the appropriate file-based URLs for file-name-handlers.
- * lisp/url-ftp.el: Moved the FTP stuff into its own file - it
+ * url-ftp.el: Moved the FTP stuff into its own file - it
might get messy with file-name-handlers and things.
- * lisp/url-http.el (url-http-clean-headers): Fix problem when
+ * url-http.el (url-http-clean-headers): Fix problem when
using 'HEAD' requests. Thou shalt not change the length of the
region during an after-change-function.
- * lisp/url-methods.el (url-scheme-methods): New variable that
+ * url-methods.el (url-scheme-methods): New variable that
holds a list of the methods/variables we look for in a URL scheme.
(url-scheme-get-property): Use it.
1999-11-29 William M. Perry <wmperry@aventail.com>
- * lisp/url-http.el (url-http-file-attributes): Reimplement.
+ * url-http.el (url-http-file-attributes): Reimplement.
(url-http-file-exists-p): Ditto.
- * lisp/url-nfs.el: Reimplemented the `nfs' URL scheme.
+ * url-nfs.el: Reimplemented the `nfs' URL scheme.
- * lisp/url-file.el (url-file-create-wrapper): New macro to create
+ * url-file.el (url-file-create-wrapper): New macro to create
file-name-handler stubs for all the FTP/FILE stuff.
- * lisp/url-handlers.el: New file to handle file-name-handler-alist
+ * url-handlers.el: New file to handle file-name-handler-alist
cruft. Generic interface on top of functions that each URL
loader provides, if capable.
1999-11-27 William M. Perry <wmperry@aventail.com>
- * lisp/url-https.el: Implemented HTTPS support.
+ * url-https.el: Implemented HTTPS support.
1999-11-26 William M. Perry <wmperry@aventail.com>
@@ -2880,8 +3068,8 @@
;; coding: utf-8
;; End:
- Copyright (C) 1999, 2001-2002, 2004-2013 Free Software
- Foundation, Inc.
+ Copyright (C) 1999, 2001-2002, 2004-2015 Free Software Foundation,
+ Inc.
This file is part of GNU Emacs.
diff --git a/lisp/url/url-about.el b/lisp/url/url-about.el
index e01172894ab..c9dfe17c30a 100644
--- a/lisp/url/url-about.el
+++ b/lisp/url/url-about.el
@@ -1,6 +1,6 @@
;;; url-about.el --- Show internal URLs
-;; Copyright (C) 2001, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index c339a2dc2ed..87f67183b55 100644
--- a/lisp/url/url-auth.el
+++ b/lisp/url/url-auth.el
@@ -1,6 +1,6 @@
;;; url-auth.el --- Uniform Resource Locator authorization modules
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
@@ -262,12 +262,12 @@ URL is the url you are requesting authorization to. This can be either a
string representing the URL, or the parsed representation returned by
`url-generic-parse-url'
REALM is the realm at a specific site we are looking for. This should be a
- string specifying the exact realm, or nil or the symbol 'any' to
+ string specifying the exact realm, or nil or the symbol `any' to
specify that the filename portion of the URL should be used as the
realm
TYPE is the type of authentication to be returned. This is either a string
- representing the type (basic, digest, etc), or nil or the symbol 'any'
- to specify that any authentication is acceptable. If requesting 'any'
+ representing the type (basic, digest, etc), or nil or the symbol `any'
+ to specify that any authentication is acceptable. If requesting `any'
the strongest matching authentication will be returned. If this is
wrong, it's no big deal, the error from the server will specify exactly
what type of auth to use
@@ -336,11 +336,11 @@ RATING a rating between 1 and 10 of the strength of the authentication.
(t rating)))
(node (assoc type url-registered-auth-schemes)))
(if (not (fboundp function))
- (url-warn 'security
- (format (concat
- "Tried to register `%s' as an auth scheme"
- ", but it is not a function!") function)))
-
+ (url-warn
+ 'security
+ (format-message
+ "Tried to register `%s' as an auth scheme, but it is not a function!"
+ function)))
(if node
(setcdr node (cons function rating))
(setq url-registered-auth-schemes
diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el
index cb0281b87f2..8e9d128b56c 100644
--- a/lisp/url/url-cache.el
+++ b/lisp/url/url-cache.el
@@ -1,6 +1,6 @@
;;; url-cache.el --- Uniform Resource Locator retrieval tool
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
@@ -212,7 +212,7 @@ If `url-standalone-mode' is non-nil, cached items never expire."
"Remove all expired files from the cache.
`url-cache-expire-time' says how old a file has to be to be
considered \"expired\"."
- (let ((current-time (current-time))
+ (let ((now (current-time))
(total-files 0)
(deleted-files 0))
(setq directory (or directory url-cache-directory))
@@ -228,7 +228,7 @@ considered \"expired\"."
(time-add
(nth 5 (file-attributes file))
(seconds-to-time url-cache-expire-time))
- current-time)
+ now)
(delete-file file)
(setq deleted-files (1+ deleted-files))))))
(if (< deleted-files total-files)
diff --git a/lisp/url/url-cid.el b/lisp/url/url-cid.el
index 5f78d0e95a0..55713c7d14b 100644
--- a/lisp/url/url-cid.el
+++ b/lisp/url/url-cid.el
@@ -1,6 +1,6 @@
;;; url-cid.el --- Content-ID URL loader
-;; Copyright (C) 1998-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1998-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index 008203c90df..df9cf621037 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -1,6 +1,6 @@
;;; url-cookie.el --- URL cookie support
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
@@ -104,9 +104,10 @@ telling Microsoft that."
(insert ";; Emacs-W3 HTTP cookies file\n"
";; Automatically generated file!!! DO NOT EDIT!!!\n\n"
"(setq url-cookie-storage\n '")
- (pp url-cookie-storage (current-buffer))
- (insert ")\n(setq url-cookie-secure-storage\n '")
- (pp url-cookie-secure-storage (current-buffer))
+ (let ((print-length nil) (print-level nil))
+ (pp url-cookie-storage (current-buffer))
+ (insert ")\n(setq url-cookie-secure-storage\n '")
+ (pp url-cookie-secure-storage (current-buffer)))
(insert ")\n")
(insert " \n;; Local Variables:\n"
";; version-control: never\n"
@@ -158,7 +159,9 @@ telling Microsoft that."
"Return non-nil if COOKIE is expired."
(let ((exp (url-cookie-expires cookie)))
(and (> (length exp) 0)
- (> (float-time) (float-time (date-to-time exp))))))
+ (condition-case ()
+ (> (float-time) (float-time (date-to-time exp)))
+ (error nil)))))
(defun url-cookie-retrieve (host &optional localpart secure)
"Retrieve all cookies for a specified HOST and LOCALPART."
@@ -261,7 +264,7 @@ telling Microsoft that."
(and expires
(string-match
(concat "^[^,]+, +\\(..\\)-\\(...\\)-\\(..\\) +"
- "\\(..:..:..\\) +\\[*\\([^\]]+\\)\\]*$")
+ "\\(..:..:..\\) +\\[*\\([^]]+\\)\\]*$")
expires)
(setq expires (concat (match-string 1 expires) " "
(match-string 2 expires) " "
@@ -352,9 +355,9 @@ to run the `url-cookie-setup-save-timer' function manually."
;;; Mode for listing and editing cookies.
(defun url-cookie-list ()
- "List the URL cookies."
+ "Display a buffer listing the current URL cookies, if there are any.
+Use \\<url-cookie-mode-map>\\[url-cookie-delete] to remove cookies."
(interactive)
-
(when (and (null url-cookie-secure-storage)
(null url-cookie-storage))
(error "No cookies are defined"))
diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el
index a31206a2f6f..1cf6b8209f9 100644
--- a/lisp/url/url-dav.el
+++ b/lisp/url/url-dav.el
@@ -1,9 +1,9 @@
;;; url-dav.el --- WebDAV support
-;; Copyright (C) 2001, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2004-2015 Free Software Foundation, Inc.
;; Author: Bill Perry <wmperry@gnu.org>
-;; Maintainer: Bill Perry <wmperry@gnu.org>
+;; Maintainer: emacs-devel@gnu.org
;; Keywords: url, vc
;; This file is part of GNU Emacs.
@@ -479,9 +479,9 @@ names (ie: DAV:resourcetype)."
" <DAV:allprop/>")
depth nil namespaces))
-(defmacro url-dav-http-success-p (status)
+(define-inline url-dav-http-success-p (status)
"Return whether STATUS was the result of a successful DAV request."
- `(= (/ (or ,status 500) 100) 2))
+ (inline-quote (= (/ (or ,status 500) 100) 2)))
;;; Locking support
@@ -495,7 +495,7 @@ make sure you are comfortable with it leaking to the outside world.")
(defun url-dav-lock-resource (url exclusive &optional depth)
"Request a lock on URL. If EXCLUSIVE is non-nil, get an exclusive lock.
Optional 3rd argument DEPTH says how deep the lock should go, default is 0
-\(lock only the resource and none of its children\).
+\(lock only the resource and none of its children).
Returns a cons-cell of (SUCCESSFUL-RESULTS . FAILURE-RESULTS).
SUCCESSFUL-RESULTS is a list of (URL STATUS locktoken).
@@ -741,7 +741,7 @@ files in the collection as well."
(if (and (not recursive)
(/= (length props) 1))
(signal 'file-error (list "Removing directory"
- "directory not empty" url)))))
+ "Directory not empty" url)))))
(mapc (lambda (result)
(setq status (plist-get (cdr result) 'DAV:status))
@@ -760,7 +760,7 @@ files in the collection as well."
url lock-token
(setq props (url-dav-get-properties url))
(if (eq (plist-get (cdar props) 'DAV:resourcetype) 'DAV:collection)
- (signal 'file-error (list "Removing old name" "is a collection" url)))))
+ (signal 'file-error (list "Removing old name" "Is a collection" url)))))
(mapc (lambda (result)
(setq status (plist-get (cdr result) 'DAV:status))
@@ -787,7 +787,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
(when (and (= (length properties) 1)
(not (url-dav-file-directory-p url)))
- (signal 'file-error (list "Opening directory" "not a directory" url)))
+ (signal 'file-error (list "Opening directory" "Not a directory" url)))
(while properties
(setq child-props (pop properties)
diff --git a/lisp/url/url-dired.el b/lisp/url/url-dired.el
index 0ac0dfbcf71..fe621cea1aa 100644
--- a/lisp/url/url-dired.el
+++ b/lisp/url/url-dired.el
@@ -1,6 +1,6 @@
;;; url-dired.el --- URL Dired minor mode
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, files
diff --git a/lisp/url/url-domsuf.el b/lisp/url/url-domsuf.el
index 0db33b8151f..97c07590edb 100644
--- a/lisp/url/url-domsuf.el
+++ b/lisp/url/url-domsuf.el
@@ -1,6 +1,6 @@
;;; url-domsuf.el --- Say what domain names can have cookies set.
-;; Copyright (C) 2012-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2015 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -32,8 +32,12 @@
(defun url-domsuf-parse-file ()
(with-temp-buffer
- (insert-file-contents
- (expand-file-name "publicsuffix.txt" data-directory))
+ (with-auto-compression-mode
+ (insert-file-contents
+ (let* ((suffixfile (expand-file-name "publicsuffix.txt" data-directory))
+ (compressed-file (concat suffixfile ".gz")))
+ (or (and (file-readable-p compressed-file) compressed-file)
+ suffixfile))))
(let ((domains nil)
domain exception)
(while (not (eobp))
@@ -72,11 +76,11 @@
((and (null modifier)
(string= domain entry))
(setq allowedp nil))
- ;; "!pref.hokkaido.jp"
+ ;; "!city.yokohama.jp"
((and (eq modifier t)
(string= domain entry))
(setq allowedp t))
- ;; "*.ar"
+ ;; "*.bd"
((and (numberp modifier)
(= length modifier)
(string= entry upper-domain))
@@ -85,13 +89,14 @@
;; Tests:
+;; TODO convert to a proper test/automated test.
;; (url-domsuf-cookie-allowed-p "com") => nil
-;; (url-domsuf-cookie-allowed-p "foo.bar.ar") => t
-;; (url-domsuf-cookie-allowed-p "bar.ar") => nil
+;; (url-domsuf-cookie-allowed-p "foo.bar.bd") => t
+;; (url-domsuf-cookie-allowed-p "bar.bd") => nil
;; (url-domsuf-cookie-allowed-p "co.uk") => nil
;; (url-domsuf-cookie-allowed-p "foo.bar.hokkaido.jo") => t
-;; (url-domsuf-cookie-allowed-p "bar.hokkaido.jp") => nil
-;; (url-domsuf-cookie-allowed-p "pref.hokkaido.jp") => t
+;; (url-domsuf-cookie-allowed-p "bar.yokohama.jp") => nil
+;; (url-domsuf-cookie-allowed-p "city.yokohama.jp") => t
(provide 'url-domsuf)
diff --git a/lisp/url/url-expand.el b/lisp/url/url-expand.el
index 51a3e64064a..c468a7952ec 100644
--- a/lisp/url/url-expand.el
+++ b/lisp/url/url-expand.el
@@ -1,6 +1,6 @@
;;; url-expand.el --- expand-file-name for URLs
-;; Copyright (C) 1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el
index e4d6b649a5b..e28af956f81 100644
--- a/lisp/url/url-file.el
+++ b/lisp/url/url-file.el
@@ -1,6 +1,6 @@
;;; url-file.el --- File retrieval code
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-ftp.el b/lisp/url/url-ftp.el
index 16e82cbe115..f558c6a97a8 100644
--- a/lisp/url/url-ftp.el
+++ b/lisp/url/url-ftp.el
@@ -1,6 +1,6 @@
;;; url-ftp.el --- FTP wrapper
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-future.el b/lisp/url/url-future.el
index cb3276d0745..f611c817231 100644
--- a/lisp/url/url-future.el
+++ b/lisp/url/url-future.el
@@ -1,6 +1,6 @@
;;; url-future.el --- general futures facility for url.el
-;; Copyright (C) 2011-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
;; Author: Teodor Zlatanov <tzz@lifelogs.com>
;; Keywords: data
@@ -44,17 +44,17 @@
(cl-defstruct url-future callback errorback status value)
-(defmacro url-future-done-p (url-future)
- `(url-future-status ,url-future))
+(define-inline url-future-done-p (url-future)
+ (inline-quote (url-future-status ,url-future)))
-(defmacro url-future-completed-p (url-future)
- `(eq (url-future-status ,url-future) t))
+(define-inline url-future-completed-p (url-future)
+ (inline-quote (eq (url-future-status ,url-future) t)))
-(defmacro url-future-errored-p (url-future)
- `(eq (url-future-status ,url-future) 'error))
+(define-inline url-future-errored-p (url-future)
+ (inline-quote (eq (url-future-status ,url-future) 'error)))
-(defmacro url-future-cancelled-p (url-future)
- `(eq (url-future-status ,url-future) 'cancel))
+(define-inline url-future-cancelled-p (url-future)
+ (inline-quote (eq (url-future-status ,url-future) 'cancel)))
(defun url-future-finish (url-future &optional status)
(if (url-future-done-p url-future)
diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el
index 7910460910d..ab61802a6bb 100644
--- a/lisp/url/url-gw.el
+++ b/lisp/url/url-gw.el
@@ -1,8 +1,9 @@
;;; url-gw.el --- Gateway munging for URL loading
-;; Copyright (C) 1997-1998, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2004-2015 Free Software Foundation, Inc.
;; Author: Bill Perry <wmperry@gnu.org>
+;; Maintainer: emacs-devel@gnu.org
;; Keywords: comm, data, processes
;; This file is part of GNU Emacs.
@@ -38,7 +39,7 @@
:group 'url-gateway)
(defcustom url-gateway-prompt-pattern
- "^[^#$%>;]*[#$%>;] *" ;; "bash\\|\$ *\r?$\\|> *\r?"
+ "^[^#$%>;]*[#$%>;] *" ;; "bash\\|[$>] *\r?$"
"A regular expression matching a shell prompt."
:type 'regexp
:group 'url-gateway)
@@ -202,20 +203,24 @@ linked Emacs under SunOS 4.x."
proc)))
;;;###autoload
-(defun url-open-stream (name buffer host service)
+(defun url-open-stream (name buffer host service &optional gateway-method)
"Open a stream to HOST, possibly via a gateway.
Args per `open-network-stream'.
Will not make a connection if `url-gateway-unplugged' is non-nil.
-Might do a non-blocking connection; use `process-status' to check."
+Might do a non-blocking connection; use `process-status' to check.
+
+Optional arg GATEWAY-METHOD specifies the gateway to be used,
+overriding the value of `url-gateway-method'."
(unless url-gateway-unplugged
- (let ((gw-method (if (and url-gateway-local-host-regexp
- (not (eq 'tls url-gateway-method))
- (not (eq 'ssl url-gateway-method))
- (string-match
- url-gateway-local-host-regexp
- host))
- 'native
- url-gateway-method))
+ (let* ((gwm (or gateway-method url-gateway-method))
+ (gw-method (if (and url-gateway-local-host-regexp
+ (not (eq 'tls gwm))
+ (not (eq 'ssl gwm))
+ (string-match
+ url-gateway-local-host-regexp
+ host))
+ 'native
+ gwm))
;; An attempt to deal with denied connections, and attempt
;; to reconnect
(cur-retries 0)
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index e9bd1628c99..a5d9f37b5ee 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -1,6 +1,6 @@
-;;; url-handlers.el --- file-name-handler stuff for URL loading
+;;; url-handlers.el --- file-name-handler stuff for URL loading -*- lexical-binding:t -*-
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
@@ -51,7 +51,7 @@
;; delete-directory Finished (DAV)
;; delete-file Finished (DAV)
;; diff-latest-backup-file
-;; directory-file-name unnecessary (what about VMS)?
+;; directory-file-name unnecessary
;; directory-files Finished (DAV)
;; dired-call-process
;; dired-compress-file
@@ -111,17 +111,18 @@ the mode if ARG is omitted or nil."
(push (cons url-handler-regexp 'url-file-handler)
file-name-handler-alist)))
-(defcustom url-handler-regexp "\\`\\(https?\\|ftp\\|file\\|nfs\\)://"
+(defcustom url-handler-regexp "\\`\\(https?\\|ftp\\|file\\|nfs\\|ssh\\|scp\\|rsync\\|telnet\\)://"
"Regular expression for URLs handled by `url-handler-mode'.
When URL Handler mode is enabled, this regular expression is
added to `file-name-handler-alist'.
Some valid URL protocols just do not make sense to visit
-interactively \(about, data, info, irc, mailto, etc\). This
+interactively \(about, data, info, irc, mailto, etc.). This
regular expression avoids conflicts with local files that look
-like URLs \(Gnus is particularly bad at this\)."
+like URLs \(Gnus is particularly bad at this)."
:group 'url
:type 'regexp
+ :version "25.1"
:set (lambda (symbol value)
(let ((enable url-handler-mode))
(url-handler-mode 0)
@@ -136,25 +137,41 @@ like URLs \(Gnus is particularly bad at this\)."
(inhibit-file-name-operation operation))
(apply operation args)))
+(defvar url-file-handler-load-in-progress nil
+ "Check for recursive load.")
+
;;;###autoload
(defun url-file-handler (operation &rest args)
"Function called from the `file-name-handler-alist' routines.
OPERATION is what needs to be done (`file-exists-p', etc). ARGS are
the arguments that would have been passed to OPERATION."
- (let ((fn (get operation 'url-file-handlers))
- (val nil)
- (hooked nil))
- (if (and (not fn) (intern-soft (format "url-%s" operation))
- (fboundp (intern-soft (format "url-%s" operation))))
- (error "Missing URL handler mapping for %s" operation))
- (if fn
- (setq hooked t
- val (save-match-data (apply fn args)))
- (setq hooked nil
- val (url-run-real-handler operation args)))
- (url-debug 'handlers "%s %S%S => %S" (if hooked "Hooked" "Real")
- operation args val)
- val))
+ ;; Avoid recursive load.
+ (if (and load-in-progress url-file-handler-load-in-progress)
+ (url-run-real-handler operation args)
+ (let ((url-file-handler-load-in-progress load-in-progress))
+ ;; Check, whether there are arguments we want pass to Tramp.
+ (if (catch :do
+ (dolist (url (cons default-directory args))
+ (and (member
+ (url-type (url-generic-parse-url (and (stringp url) url)))
+ url-tramp-protocols)
+ (throw :do t))))
+ (apply 'url-tramp-file-handler operation args)
+ ;; Otherwise, let's do the job.
+ (let ((fn (get operation 'url-file-handlers))
+ (val nil)
+ (hooked nil))
+ (if (and (not fn) (intern-soft (format "url-%s" operation))
+ (fboundp (intern-soft (format "url-%s" operation))))
+ (error "Missing URL handler mapping for %s" operation))
+ (if fn
+ (setq hooked t
+ val (save-match-data (apply fn args)))
+ (setq hooked nil
+ val (url-run-real-handler operation args)))
+ (url-debug 'handlers "%s %S%S => %S" (if hooked "Hooked" "Real")
+ operation args val)
+ val)))))
(defun url-file-handler-identity (&rest args)
;; Identity function
@@ -206,12 +223,12 @@ the arguments that would have been passed to OPERATION."
;; which really stands for "/".
;; FIXME: maybe we should check that the host part is "" or "localhost"
;; or some name that represents the local host?
- (or (file-name-directory (url-filename url)) "/")
+ (or (file-name-as-directory (url-filename url)) "/")
;; All other URLs are not expected to be directly accessible from
;; a local process.
nil)))
-(defun url-handler-file-remote-p (filename &optional identification connected)
+(defun url-handler-file-remote-p (filename &optional identification _connected)
(let ((url (url-generic-parse-url filename)))
(if (and (url-type url) (not (equal (url-type url) "file")))
;; Maybe we can find a suitable check for CONNECTED. For now,
@@ -233,7 +250,7 @@ the arguments that would have been passed to OPERATION."
;; The actual implementation
;;;###autoload
(defun url-copy-file (url newname &optional ok-if-already-exists
- keep-time preserve-uid-gid)
+ _keep-time _preserve-uid-gid)
"Copy URL to NEWNAME. Both args must be strings.
Signals a `file-already-exists' error if file NEWNAME already exists,
unless a third argument OK-IF-ALREADY-EXISTS is supplied and non-nil.
@@ -290,11 +307,22 @@ They count bytes from the beginning of the body."
(insert data))
(list (length data) charset)))
+(defvar url-http-codes)
+
;;;###autoload
(defun url-insert-file-contents (url &optional visit beg end replace)
(let ((buffer (url-retrieve-synchronously url)))
- (if (not buffer)
- (error "Opening input file: No such file or directory, %s" url))
+ (unless buffer (signal 'file-error (list url "No Data")))
+ (with-current-buffer buffer
+ ;; XXX: This is HTTP/S specific and should be moved to url-http
+ ;; instead. See http://debbugs.gnu.org/17549.
+ (when (bound-and-true-p url-http-response-status)
+ (unless (and (>= url-http-response-status 200)
+ (< url-http-response-status 300))
+ (let ((desc (nth 2 (assq url-http-response-status url-http-codes))))
+ (kill-buffer buffer)
+ ;; Signal file-error per http://debbugs.gnu.org/16733.
+ (signal 'file-error (list url desc))))))
(if visit (setq buffer-file-name url))
(save-excursion
(let* ((start (point))
@@ -306,18 +334,24 @@ They count bytes from the beginning of the body."
(unless (cadr size-and-charset)
;; If the headers don't specify any particular charset, use the
;; usual heuristic/rules that we apply to files.
- (decode-coding-inserted-region start (point) url visit beg end replace))
- (list url (car size-and-charset))))))
+ (decode-coding-inserted-region start (point) url
+ visit beg end replace))
+ (let ((inserted (car size-and-charset)))
+ (when (fboundp 'after-insert-file-set-coding)
+ (let ((insval (after-insert-file-set-coding inserted visit)))
+ (if insval (setq inserted insval))))
+ (list url inserted))))))
+
(put 'insert-file-contents 'url-file-handlers 'url-insert-file-contents)
-(defun url-file-name-completion (url directory &optional predicate)
+(defun url-file-name-completion (url _directory &optional _predicate)
;; Even if it's not implemented, it's not an error to ask for completion,
;; in case it's available (bug#14806).
;; (error "Unimplemented")
url)
(put 'file-name-completion 'url-file-handlers 'url-file-name-completion)
-(defun url-file-name-all-completions (file directory)
+(defun url-file-name-all-completions (_file _directory)
;; Even if it's not implemented, it's not an error to ask for completion,
;; in case it's available (bug#14806).
;; (error "Unimplemented")
diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el
index d0635d3f6bb..ee0a13bd989 100644
--- a/lisp/url/url-history.el
+++ b/lisp/url/url-history.el
@@ -1,6 +1,6 @@
;;; url-history.el --- Global history tracking for URL package
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
@@ -44,7 +44,7 @@ session."
(url-history-setup-save-timer)))
:type '(choice (const :tag "off" nil)
(const :tag "on" t)
- (const :tag "within session" 'session))
+ (other :tag "within session" session))
:group 'url-history)
(defcustom url-history-file nil
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 7047e6b5f13..7367a1eb3e9 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -1,8 +1,9 @@
;;; url-http.el --- HTTP retrieval routines
-;; Copyright (C) 1999, 2001, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001, 2004-2015 Free Software Foundation, Inc.
;; Author: Bill Perry <wmperry@gnu.org>
+;; Maintainer: emacs-devel@gnu.org
;; Keywords: comm, data, processes
;; This file is part of GNU Emacs.
@@ -24,7 +25,9 @@
;;; Code:
-(eval-when-compile (require 'cl-lib))
+(require 'cl-lib)
+(eval-when-compile
+ (require 'subr-x))
(defvar url-callback-arguments)
(defvar url-callback-function)
@@ -39,6 +42,7 @@
(defvar url-http-data)
(defvar url-http-end-of-headers)
(defvar url-http-extra-headers)
+(defvar url-http-noninteractive)
(defvar url-http-method)
(defvar url-http-no-retry)
(defvar url-http-process)
@@ -47,11 +51,9 @@
(defvar url-http-response-version)
(defvar url-http-target-url)
(defvar url-http-transfer-encoding)
-(defvar url-http-end-of-headers)
(defvar url-show-status)
(require 'url-gw)
-(require 'url-util)
(require 'url-parse)
(require 'url-cookie)
(require 'mail-parse)
@@ -133,6 +135,17 @@ request.")
(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.
@@ -172,7 +185,7 @@ request.")
url-http-open-connections))
nil)
-(defun url-http-find-free-connection (host port)
+(defun url-http-find-free-connection (host port &optional gateway-method)
(let ((conns (gethash (cons host port) url-http-open-connections))
(connection nil))
(while (and conns (not connection))
@@ -194,7 +207,7 @@ request.")
;; `url-open-stream' needs a buffer in which to do things
;; like authentication. But we use another buffer afterwards.
(unwind-protect
- (let ((proc (url-open-stream host buf host port)))
+ (let ((proc (url-open-stream host buf host port gateway-method)))
;; url-open-stream might return nil.
(when (processp proc)
;; Drop the temp buffer link before killing the buffer.
@@ -215,11 +228,9 @@ request.")
(and (listp url-privacy-level)
(memq 'agent url-privacy-level)))
""
- (format "User-Agent: %sURL/%s\r\n"
- (if url-package-name
- (concat url-package-name "/" url-package-version " ")
- "")
- url-version)))
+ (if (functionp url-user-agent)
+ (funcall url-user-agent)
+ url-user-agent)))
(defun url-http-create-request (&optional ref-url)
"Create an HTTP request for `url-http-target-url', referred to by REF-URL."
@@ -314,7 +325,14 @@ request.")
(concat
"From: " url-personal-mail-address "\r\n"))
;; Encodings we understand
- (if url-mime-encoding-string
+ (if (or url-mime-encoding-string
+ ;; MS-Windows loads zlib dynamically, so recheck
+ ;; in case they made it available since
+ ;; initialization in url-vars.el.
+ (and (eq 'system-type 'windows-nt)
+ (fboundp 'zlib-available-p)
+ (zlib-available-p)
+ (setq url-mime-encoding-string "gzip")))
(concat
"Accept-encoding: " url-mime-encoding-string "\r\n"))
(if url-mime-charset-string
@@ -357,9 +375,7 @@ request.")
;; End request
"\r\n"
;; Any data
- url-http-data
- ;; If `url-http-data' is nil, avoid two CRLFs (Bug#8931).
- (if url-http-data "\r\n")))
+ url-http-data))
""))
(url-http-debug "Request is: \n%s" request)
request))
@@ -417,7 +433,7 @@ Return the number of characters removed."
(goto-char (point-max))
(insert "<hr>Sorry, but I do not know how to handle " type
" authentication. If you'd like to write it,"
- " send it to " url-bug-address ".<hr>")
+ " please use M-x report-emacs-bug RET.<hr>")
;; We used to set a `status' var (declared "special") but I can't
;; find the corresponding let-binding, so it's probably an error.
;; FIXME: Maybe it was supposed to set `success', i.e. to return t?
@@ -469,6 +485,8 @@ work correctly."
)
)
+(declare-function gnutls-peer-status "gnutls.c" (proc))
+
(defun url-http-parse-headers ()
"Parse and handle HTTP specific headers.
Return t if and only if the current buffer is still active and
@@ -478,7 +496,14 @@ should be shown to the user."
(url-http-mark-connection-as-free (url-host url-current-object)
(url-port url-current-object)
url-http-process)
-
+ ;; Pass the https certificate on to the caller.
+ (when (gnutls-available-p)
+ (let ((status (gnutls-peer-status url-http-process)))
+ (when (or status
+ (plist-get (car url-callback-arguments) :peer))
+ (setcar url-callback-arguments
+ (plist-put (car url-callback-arguments)
+ :peer status)))))
(if (or (not (boundp 'url-http-end-of-headers))
(not url-http-end-of-headers))
(error "Trying to parse headers in odd buffer: %s" (buffer-name)))
@@ -621,6 +646,12 @@ should be shown to the user."
;; compute the redirection relative to the URL of the proxy.
(setq redirect-uri
(url-expand-file-name redirect-uri url-http-target-url)))
+ ;; Do not automatically include an authorization header in the
+ ;; redirect. If needed it will be regenerated by the relevant
+ ;; auth scheme when the new request happens.
+ (setq url-http-extra-headers
+ (cl-remove "Authorization"
+ url-http-extra-headers :key 'car :test 'equal))
(let ((url-request-method url-http-method)
(url-request-data url-http-data)
(url-request-extra-headers url-http-extra-headers))
@@ -858,10 +889,12 @@ should be shown to the user."
(goto-char (point-min))
success))
+(declare-function zlib-decompress-region "decompress.c" (start end))
+
(defun url-handle-content-transfer-encoding ()
(let ((encoding (mail-fetch-field "content-encoding")))
(when (and encoding
- (fboundp 'zlib-decompress-region)
+ (fboundp 'zlib-available-p)
(zlib-available-p)
(equal (downcase encoding) "gzip"))
(save-restriction
@@ -876,7 +909,8 @@ should be shown to the user."
(url-http-mark-connection-as-free (url-host url-current-object)
(url-port url-current-object)
url-http-process)
- (url-http-debug "Activating callback in buffer (%s)" (buffer-name))
+ (url-http-debug "Activating callback in buffer (%s): %S %S"
+ (buffer-name) url-callback-function url-callback-arguments)
(apply url-callback-function url-callback-arguments))
;; )
@@ -917,7 +951,7 @@ should be shown to the user."
(defun url-http-simple-after-change-function (st nd length)
;; Function used when we do NOT know how long the document is going to be
;; Just _very_ simple 'downloaded %d' type of info.
- (url-lazy-message "Reading %s..." (url-pretty-length nd)))
+ (url-lazy-message "Reading %s..." (file-size-human-readable nd)))
(defun url-http-content-length-after-change-function (st nd length)
"Function used when we DO know how long the document is going to be.
@@ -930,16 +964,16 @@ the callback to be triggered."
(url-percentage (- nd url-http-end-of-headers)
url-http-content-length)
url-http-content-type
- (url-pretty-length (- nd url-http-end-of-headers))
- (url-pretty-length url-http-content-length)
+ (file-size-human-readable (- nd url-http-end-of-headers))
+ (file-size-human-readable url-http-content-length)
(url-percentage (- nd url-http-end-of-headers)
url-http-content-length))
(url-display-percentage
"Reading... %s of %s (%d%%)"
(url-percentage (- nd url-http-end-of-headers)
url-http-content-length)
- (url-pretty-length (- nd url-http-end-of-headers))
- (url-pretty-length url-http-content-length)
+ (file-size-human-readable (- nd url-http-end-of-headers))
+ (file-size-human-readable url-http-content-length)
(url-percentage (- nd url-http-end-of-headers)
url-http-content-length)))
@@ -1168,22 +1202,28 @@ the end of the document."
(when (eq process-buffer (current-buffer))
(goto-char (point-max)))))
-(defun url-http (url callback cbargs &optional retry-buffer)
+(defun url-http (url callback cbargs &optional retry-buffer gateway-method)
"Retrieve URL via HTTP asynchronously.
URL must be a parsed URL. See `url-generic-parse-url' for details.
-When retrieval is completed, execute the function CALLBACK, using
-the arguments listed in CBARGS. The first element in CBARGS
+When retrieval is completed, execute the function CALLBACK, passing it
+an updated value of CBARGS as arguments. The first element in CBARGS
should be a plist describing what has happened so far during the
request, as described in the docstring of `url-retrieve' (if in
doubt, specify nil).
Optional arg RETRY-BUFFER, if non-nil, specifies the buffer of a
-previous `url-http' call, which is being re-attempted."
+previous `url-http' call, which is being re-attempted.
+
+Optional arg GATEWAY-METHOD specifies the gateway to be used,
+overriding the value of `url-gateway-method'."
(cl-check-type url vector "Need a pre-parsed URL.")
(let* ((host (url-host (or url-using-proxy url)))
(port (url-port (or url-using-proxy url)))
- (connection (url-http-find-free-connection host port))
+ (nsm-noninteractive (or url-request-noninteractive
+ (and (boundp 'url-http-noninteractive)
+ url-http-noninteractive)))
+ (connection (url-http-find-free-connection host port gateway-method))
(buffer (or retry-buffer
(generate-new-buffer
(format " *http %s:%d*" host port)))))
@@ -1214,6 +1254,7 @@ previous `url-http' call, which is being re-attempted."
url-http-process
url-http-method
url-http-extra-headers
+ url-http-noninteractive
url-http-data
url-http-target-url
url-http-no-retry
@@ -1223,6 +1264,7 @@ previous `url-http' call, which is being re-attempted."
(setq url-http-method (or url-request-method "GET")
url-http-extra-headers url-request-extra-headers
+ url-http-noninteractive url-request-noninteractive
url-http-data url-request-data
url-http-process connection
url-http-chunked-length nil
@@ -1441,9 +1483,8 @@ p3p
(defmacro url-https-create-secure-wrapper (method args)
`(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args
,(format "HTTPS wrapper around `%s' call." (or method "url-http"))
- (let ((url-gateway-method 'tls))
- (,(intern (format (if method "url-http-%s" "url-http") method))
- ,@(remove '&rest (remove '&optional args))))))
+ (,(intern (format (if method "url-http-%s" "url-http") method))
+ ,@(remove '&rest (remove '&optional (append args (if method nil '(nil 'tls))))))))
;;;###autoload (autoload 'url-https "url-http")
(url-https-create-secure-wrapper nil (url callback cbargs))
diff --git a/lisp/url/url-imap.el b/lisp/url/url-imap.el
index b8dcaecd668..4095aea9e5f 100644
--- a/lisp/url/url-imap.el
+++ b/lisp/url/url-imap.el
@@ -1,6 +1,6 @@
;;; url-imap.el --- IMAP retrieval routines
-;; Copyright (C) 1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2004-2015 Free Software Foundation, Inc.
;; Author: Simon Josefsson <jas@pdc.kth.se>
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-irc.el b/lisp/url/url-irc.el
index b0622ebebe9..bdccd8f178d 100644
--- a/lisp/url/url-irc.el
+++ b/lisp/url/url-irc.el
@@ -1,6 +1,6 @@
;;; url-irc.el --- IRC URL interface
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-ldap.el b/lisp/url/url-ldap.el
index bfb5458bc03..5c5ee760738 100644
--- a/lisp/url/url-ldap.el
+++ b/lisp/url/url-ldap.el
@@ -1,6 +1,6 @@
;;; url-ldap.el --- LDAP Uniform Resource Locator retrieval code
-;; Copyright (C) 1998-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1998-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el
index 55f477c2522..3dd89d5419f 100644
--- a/lisp/url/url-mailto.el
+++ b/lisp/url/url-mailto.el
@@ -1,6 +1,6 @@
;;; url-mail.el --- Mail Uniform Resource Locator retrieval code
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el
index d4fa59e9720..a4f711b7004 100644
--- a/lisp/url/url-methods.el
+++ b/lisp/url/url-methods.el
@@ -1,6 +1,6 @@
;;; url-methods.el --- Load URL schemes as needed
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-misc.el b/lisp/url/url-misc.el
index c8e9b591790..b21b15d5e8a 100644
--- a/lisp/url/url-misc.el
+++ b/lisp/url/url-misc.el
@@ -1,6 +1,6 @@
;;; url-misc.el --- Misc Uniform Resource Locator retrieval code
-;; Copyright (C) 1996-1999, 2002, 2004-2013 Free Software Foundation,
+;; Copyright (C) 1996-1999, 2002, 2004-2015 Free Software Foundation,
;; Inc.
;; Keywords: comm, data, processes
@@ -89,19 +89,19 @@
(save-excursion
(if (not (string-match "\\([^,]*\\)?," desc))
(error "Malformed data URL: %s" desc)
- (setq mediatype (match-string 1 desc))
+ (setq mediatype (match-string 1 desc)
+ data (url-unhex-string (substring desc (match-end 0))))
(if (and mediatype (string-match ";base64\\'" mediatype))
(setq mediatype (substring mediatype 0 (match-beginning 0))
encoding "base64"))
(if (or (null mediatype)
(eq ?\; (aref mediatype 0)))
- (setq mediatype (concat "text/plain" mediatype)))
- (setq data (url-unhex-string (substring desc (match-end 0)))))
+ (setq mediatype (concat "text/plain" mediatype))))
(set-buffer (generate-new-buffer " *url-data*"))
(mm-disable-multibyte)
(insert (format "Content-Length: %d\n" (length data))
"Content-Type: " mediatype "\n"
- "Content-Encoding: " encoding "\n"
+ "Content-Transfer-Encoding: " encoding "\n"
"\n")
(if data (insert data))
(current-buffer))))
diff --git a/lisp/url/url-news.el b/lisp/url/url-news.el
index d4532626183..38a75528e31 100644
--- a/lisp/url/url-news.el
+++ b/lisp/url/url-news.el
@@ -1,6 +1,6 @@
;;; url-news.el --- News Uniform Resource Locator retrieval code
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
@@ -70,8 +70,7 @@
" </xmp>\n"
" </p>\n"
" <p>\n"
- " If you If you feel this is an error, <a href=\""
- "mailto:" url-bug-address "\">send mail</a>\n"
+ " If you feel this is an error, M-x report-emacs-bug RET.\n"
" </p>\n"
" </div>\n"
" </body>\n"
diff --git a/lisp/url/url-nfs.el b/lisp/url/url-nfs.el
index 2870a9a5af9..1f8a4096460 100644
--- a/lisp/url/url-nfs.el
+++ b/lisp/url/url-nfs.el
@@ -1,6 +1,6 @@
;;; url-nfs.el --- NFS URL interface
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-ns.el b/lisp/url/url-ns.el
index 3fe074f1e0c..88a40547f49 100644
--- a/lisp/url/url-ns.el
+++ b/lisp/url/url-ns.el
@@ -1,6 +1,6 @@
;;; url-ns.el --- Various netscape-ish functions for proxy definitions
-;; Copyright (C) 1997-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index 1628290a358..dbf0c386871 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -1,6 +1,6 @@
;;; url-parse.el --- Uniform Resource Locator parser
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
@@ -125,7 +125,7 @@ TARGET is the fragment identifier component (used to refer to a
ATTRIBUTES is nil; this slot originally stored the attribute and
value alists for IMAP URIs, but this feature was removed
since it conflicts with RFC 3986.
-FULLNESS is non-nil iff the hierarchical sequence component of
+FULLNESS is non-nil if the hierarchical sequence component of
the URL starts with two slashes, \"//\".
The parser follows RFC 3986, except that it also tries to handle
diff --git a/lisp/url/url-privacy.el b/lisp/url/url-privacy.el
index 0c091680507..77c3f642719 100644
--- a/lisp/url/url-privacy.el
+++ b/lisp/url/url-privacy.el
@@ -1,6 +1,6 @@
;;; url-privacy.el --- Global history tracking for URL package
-;; Copyright (C) 1996-1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-proxy.el b/lisp/url/url-proxy.el
index 44587e93bc6..b292e31def2 100644
--- a/lisp/url/url-proxy.el
+++ b/lisp/url/url-proxy.el
@@ -1,6 +1,6 @@
;;; url-proxy.el --- Proxy server support
-;; Copyright (C) 1999, 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2004-2015 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el
index f4b9093f086..c667cb932d5 100644
--- a/lisp/url/url-queue.el
+++ b/lisp/url/url-queue.el
@@ -1,6 +1,6 @@
;;; url-queue.el --- Fetching web pages in parallel
-;; Copyright (C) 2011-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: comm
@@ -69,7 +69,7 @@ The variable `url-queue-timeout' sets a timeout."
:inhibit-cookiesp inhibit-cookies))))
(url-queue-setup-runners))
-;; To ensure asynch behaviour, we start the required number of queue
+;; To ensure asynch behavior, we start the required number of queue
;; runners from `run-with-idle-timer'. So we're basically going
;; through the queue in two ways: 1) synchronously when a program
;; calls `url-queue-retrieve' (which will then start the required
@@ -133,10 +133,11 @@ The variable `url-queue-timeout' sets a timeout."
(defun url-queue-start-retrieve (job)
(setf (url-queue-buffer job)
(ignore-errors
- (url-retrieve (url-queue-url job)
- #'url-queue-callback-function (list job)
- (url-queue-silentp job)
- (url-queue-inhibit-cookiesp job)))))
+ (let ((url-request-noninteractive t))
+ (url-retrieve (url-queue-url job)
+ #'url-queue-callback-function (list job)
+ (url-queue-silentp job)
+ (url-queue-inhibit-cookiesp job))))))
(defun url-queue-prune-old-entries ()
(let (dead-jobs)
diff --git a/lisp/url/url-tramp.el b/lisp/url/url-tramp.el
new file mode 100644
index 00000000000..d0b1a5c3420
--- /dev/null
+++ b/lisp/url/url-tramp.el
@@ -0,0 +1,79 @@
+;;; url-tramp.el --- file-name-handler magic invoking Tramp for some protocols
+
+;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+
+;; Author: Michael Albinus <michael.albinus@gmx.de>
+;; Keywords: comm, data, processes, hypermedia
+
+;; This file is part of GNU Emacs.
+;;
+;; 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 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
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'url-parse)
+(require 'tramp)
+(require 'password-cache)
+
+;;;###autoload
+(defcustom url-tramp-protocols '("ftp" "ssh" "scp" "rsync" "telnet")
+ "List of URL protocols the work is handled by Tramp.
+They must also be covered by `url-handler-regexp'."
+ :group 'url
+ :version "25.1"
+ :type '(list string))
+
+(defun url-tramp-convert-url-to-tramp (url)
+ "Convert URL to a Tramp file name."
+ (let ((obj (url-generic-parse-url (and (stringp url) url))))
+ (if (member (url-type obj) url-tramp-protocols)
+ (progn
+ (if (url-password obj)
+ (password-cache-add
+ (tramp-make-tramp-file-name
+ (url-type obj) (url-user obj) (url-host obj) "")
+ (url-password obj))
+ (tramp-make-tramp-file-name
+ (url-type obj) (url-user obj) (url-host obj) (url-filename obj))))
+ url)))
+
+(defun url-tramp-convert-tramp-to-url (file)
+ "Convert FILE, a Tramp file name, to a URL."
+ (let ((obj (ignore-errors (tramp-dissect-file-name file))))
+ (if (member (tramp-file-name-method obj) url-tramp-protocols)
+ (url-recreate-url
+ (url-parse-make-urlobj
+ (tramp-file-name-method obj)
+ (tramp-file-name-user obj)
+ nil ; password.
+ (tramp-file-name-host obj)
+ nil ; port.
+ (tramp-file-name-localname obj)
+ nil nil t)) ; target attributes fullness.
+ file)))
+
+;;;###autoload
+(defun url-tramp-file-handler (operation &rest args)
+ "Function called from the `file-name-handler-alist' routines.
+OPERATION is what needs to be done. ARGS are the arguments that
+would have been passed to OPERATION."
+ (let ((default-directory (url-tramp-convert-url-to-tramp default-directory))
+ (args (mapcar 'url-tramp-convert-url-to-tramp args)))
+ (url-tramp-convert-tramp-to-url (apply operation args))))
+
+(provide 'url-tramp)
+
+;;; url-tramp.el ends here
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index c40768ba42a..e011b96ada2 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -1,9 +1,10 @@
;;; url-util.el --- Miscellaneous helper routines for URL library
-;; Copyright (C) 1996-1999, 2001, 2004-2013 Free Software Foundation,
+;; Copyright (C) 1996-1999, 2001, 2004-2015 Free Software Foundation,
;; Inc.
;; Author: Bill Perry <wmperry@gnu.org>
+;; Maintainer: emacs-devel@gnu.org
;; Keywords: comm, data, processes
;; This file is part of GNU Emacs.
@@ -189,8 +190,7 @@ Will not do anything if `url-show-status' is nil."
(defun url-get-normalized-date (&optional specified-time)
"Return a 'real' date string that most HTTP servers can understand."
(let ((system-time-locale "C"))
- (format-time-string "%a, %d %b %Y %T GMT"
- (or specified-time (current-time)) t)))
+ (format-time-string "%a, %d %b %Y %T GMT" specified-time t)))
;;;###autoload
(defun url-eat-trailing-space (x)
@@ -211,15 +211,9 @@ Will not do anything if `url-show-status' is nil."
(setq z (1+ z)))
(substring x z nil)))
-;;;###autoload
-(defun url-pretty-length (n)
- (cond
- ((< n 1024)
- (format "%d bytes" n))
- ((< n (* 1024 1024))
- (format "%dk" (/ n 1024.0)))
- (t
- (format "%2.2fM" (/ n (* 1024 1024.0))))))
+
+(define-obsolete-function-alias 'url-pretty-length
+ 'file-size-human-readable "24.4")
;;;###autoload
(defun url-display-percentage (fmt perc &rest args)
@@ -291,7 +285,7 @@ Will not do anything if `url-show-status' is nil."
"Build a query-string.
Given a QUERY in the form:
-'((key1 val1)
+ ((key1 val1)
(key2 val2)
(key3 val1 val2)
(key4)
@@ -634,14 +628,9 @@ Creates FILE and its parent directories if they do not exist."
(make-directory dir t)))
;; Based on doc-view-make-safe-dir.
(condition-case nil
- (let ((umask (default-file-modes)))
- (unwind-protect
- (progn
- (set-default-file-modes #o0600)
- (with-temp-buffer
- (write-region (point-min) (point-max)
- file nil 'silent nil 'excl)))
- (set-default-file-modes umask)))
+ (with-file-modes #o0600
+ (with-temp-buffer
+ (write-region (point-min) (point-max) file nil 'silent nil 'excl)))
(file-already-exists
(if (file-symlink-p file)
(error "Danger: `%s' is a symbolic link" file))
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index 0361e01dfb4..46c2ec3c69f 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -1,6 +1,6 @@
;;; url-vars.el --- Variables for Uniform Resource Locator tool
-;; Copyright (C) 1996-1999, 2001, 2004-2013 Free Software Foundation,
+;; Copyright (C) 1996-1999, 2001, 2004-2015 Free Software Foundation,
;; Inc.
;; Keywords: comm, data, processes, hypermedia
@@ -28,6 +28,8 @@
(defgroup url nil
"Uniform Resource Locator tool."
:version "22.1"
+ :link '(custom-manual "(url) Top")
+ :link '(info-link "(url) Customization")
:group 'comm)
(defgroup url-file nil
@@ -72,7 +74,7 @@ requests will be honored. If t, all refresh requests will be honored.
If non-nil and not t, the user will be asked for each refresh request."
:type '(choice (const :tag "off" nil)
(const :tag "on" t)
- (const :tag "ask" 'ask))
+ (other :tag "ask" ask))
:group 'url-hairy)
(defcustom url-automatic-caching nil
@@ -80,8 +82,8 @@ If non-nil and not t, the user will be asked for each refresh request."
:type 'boolean
:group 'url-cache)
-(defconst url-bug-address "bug-gnu-emacs@gnu.org"
- "Where to send bug reports.")
+(define-obsolete-variable-alias 'url-bug-address
+ 'report-emacs-bug-address "24.5")
(defcustom url-personal-mail-address nil
"Your full email address.
@@ -120,9 +122,9 @@ cookies -- never accept HTTP cookies
Samples:
- (setq url-privacy-level 'high)
- (setq url-privacy-level '(email lastloc)) ;; equivalent to 'high
- (setq url-privacy-level '(os))
+ (setq url-privacy-level \\='high)
+ (setq url-privacy-level \\='(email lastloc)) ;; equivalent to \\='high
+ (setq url-privacy-level \\='(os))
::NOTE::
This variable controls several other variables and is _NOT_ automatically
@@ -208,9 +210,12 @@ document."
"A list of extra headers to send with the next request.
Should be an assoc list of headers/contents.")
+(defvar url-request-noninteractive nil
+ "If non-nil, the request is done in a noninteractive context.")
+
(defvar url-request-method nil "The method to use for the next request.")
-(defvar url-mime-encoding-string (and (fboundp 'zlib-decompress-region)
+(defvar url-mime-encoding-string (and (fboundp 'zlib-available-p)
(zlib-available-p)
"gzip")
"String to send in the Accept-encoding: field in HTTP requests.")
diff --git a/lisp/url/url.el b/lisp/url/url.el
index 43e52ef25cf..095637765a3 100644
--- a/lisp/url/url.el
+++ b/lisp/url/url.el
@@ -1,9 +1,10 @@
;;; url.el --- Uniform Resource Locator retrieval tool -*- lexical-binding: t -*-
-;; Copyright (C) 1996-1999, 2001, 2004-2013 Free Software Foundation,
+;; Copyright (C) 1996-1999, 2001, 2004-2015 Free Software Foundation,
;; Inc.
;; Author: Bill Perry <wmperry@gnu.org>
+;; Maintainer: emacs-devel@gnu.org
;; Keywords: comm, data, processes, hypermedia
;; This file is part of GNU Emacs.
@@ -170,8 +171,8 @@ URL-encoded before it's used."
(defun url-retrieve-internal (url callback cbargs &optional silent
inhibit-cookies)
"Internal function; external interface is `url-retrieve'.
-CBARGS is the list of arguments that the callback function will
-receive; its first element should be a plist specifying what has
+The callback function will receive an updated value of CBARGS as
+arguments; its first element should be a plist specifying what has
happened so far during the request, as described in the docstring
of `url-retrieve' (if in doubt, specify nil).
@@ -220,7 +221,7 @@ URL-encoded before it's used."
buffer))
;;;###autoload
-(defun url-retrieve-synchronously (url)
+(defun url-retrieve-synchronously (url &optional silent inhibit-cookies)
"Retrieve URL synchronously.
Return the buffer containing the data, or nil if there are no data
associated with it (the case for dired, info, or mailto URLs that need
@@ -233,7 +234,8 @@ no further processing). URL is either a string or a parsed URL."
(url-retrieve url (lambda (&rest ignored)
(url-debug 'retrieval "Synchronous fetching done (%S)" (current-buffer))
(setq retrieval-done t
- asynch-buffer (current-buffer)))))
+ asynch-buffer (current-buffer)))
+ nil silent inhibit-cookies))
(if (null asynch-buffer)
;; We do not need to do anything, it was a mailto or something
;; similar that takes processing completely outside of the URL