diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2017-09-13 20:10:51 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2017-09-13 20:11:02 +0200 |
commit | 63398071471f6cd6b006d3c35d2d83c597549e4a (patch) | |
tree | 2bfcc3ed4f1770dc1a5312b04a63082632f53fb2 /lisp/url/url.el | |
parent | 4ab44f75d6ad7eb378c85c111ea1006076cf994b (diff) | |
download | emacs-63398071471f6cd6b006d3c35d2d83c597549e4a.tar.gz |
Make gnutls-verify-error work again with url-retrieve-synchronously
* lisp/url/url-gw.el (url-open-stream): Only use :nowait if
we're doing async connections (bug#26835).
* lisp/url/url-parse.el (url): Add an asynchronous slot.
* lisp/url/url.el (url-asynchronous): New variable.
(url-retrieve-internal): Store the value.
(url-retrieve-synchronously): Bind the variable.
Diffstat (limited to 'lisp/url/url.el')
-rw-r--r-- | lisp/url/url.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/url/url.el b/lisp/url/url.el index be6377ceb3a..a6145d3f5f3 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -119,6 +119,8 @@ variable in the original buffer as a forwarding pointer.") (defvar url-retrieve-number-of-calls 0) (autoload 'url-cache-prune-cache "url-cache") +(defvar url-asynchronous t + "Bind to nil before calling `url-retrieve' to signal :nowait connections.") ;;;###autoload (defun url-retrieve (url callback &optional cbargs silent inhibit-cookies) @@ -190,6 +192,7 @@ URL-encoded before it's used." (unless (url-type url) (error "Bad url: %s" (url-recreate-url url))) (setf (url-silent url) silent) + (setf (url-asynchronous url) url-asynchronous) (setf (url-use-cookies url) (not inhibit-cookies)) ;; Once in a while, remove old entries from the URL cache. (when (zerop (% url-retrieve-number-of-calls 1000)) @@ -232,6 +235,7 @@ how long to wait for a response before giving up." (let ((retrieval-done nil) (start-time (current-time)) + (url-asynchronous nil) (asynch-buffer nil)) (setq asynch-buffer (url-retrieve url (lambda (&rest ignored) |