+2010-09-25 Julien Danjou <julien@danjou.info>
+
+ * url-cache.el (url-cache-create-filename): Ensure no-port and
+ default-port end up with the same cache file.
+ (url-cache-create-filename-human-readable)
+ (url-cache-create-filename-using-md5): Argument is always in the form of
+ a string now.
+
2010-09-23 Glenn Morris <rgm@gnu.org>
* url-cache.el (url-is-cached): Doc fix.
(defun url-cache-create-filename-human-readable (url)
"Return a filename in the local cache for URL."
(if url
- (let* ((url (if (vectorp url) (url-recreate-url url) url))
- (urlobj (url-generic-parse-url url))
+ (let* ((urlobj (url-generic-parse-url url))
(protocol (url-type urlobj))
(hostname (url-host urlobj))
(host-components
Very fast if you have an `md5' primitive function, suitably fast otherwise."
(require 'md5)
(if url
- (let* ((url (if (vectorp url) (url-recreate-url url) url))
- (checksum (md5 url))
+ (let* ((checksum (md5 url))
(urlobj (url-generic-parse-url url))
(protocol (url-type urlobj))
(hostname (url-host urlobj))
:group 'url-cache)
(defun url-cache-create-filename (url)
- (funcall url-cache-creation-function url))
+ (funcall url-cache-creation-function
+ ;; We need to parse+recreate in order to remove the default port
+ ;; if it has been specified: e.g. http://www.example.com:80 will
+ ;; be transcoded as http://www.example.com
+ (url-recreate-url
+ (if (vectorp url) url
+ (url-generic-parse-url url)))))
;;;###autoload
(defun url-cache-extract (fnam)