comparison lisp/url/url.el @ 68123:ba5077259cc1

(url-retrieve-synchronously): Adjust the workaround so as not to stop in the middle of a redirection.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 10 Jan 2006 19:31:15 +0000
parents ea32c9f0c8e7
children 8edc29039fd2 8438f5473d99
comparison
equal deleted inserted replaced
68122:b720282b1826 68123:ba5077259cc1
188 (while (not retrieval-done) 188 (while (not retrieval-done)
189 (url-debug 'retrieval 189 (url-debug 'retrieval
190 "Spinning in url-retrieve-synchronously: %S (%S)" 190 "Spinning in url-retrieve-synchronously: %S (%S)"
191 retrieval-done asynch-buffer) 191 retrieval-done asynch-buffer)
192 (if (and proc (memq (process-status proc) 192 (if (and proc (memq (process-status proc)
193 '(closed exit signal failed))) 193 '(closed exit signal failed))
194 ;; Make sure another process hasn't been started, as can
195 ;; happen with http redirections.
196 (eq proc (or (get-buffer-process asynch-buffer) proc)))
194 ;; FIXME: It's not clear whether url-retrieve's callback is 197 ;; FIXME: It's not clear whether url-retrieve's callback is
195 ;; guaranteed to be called or not. It seems that url-http 198 ;; guaranteed to be called or not. It seems that url-http
196 ;; decides sometimes consciously not to call it, so it's not 199 ;; decides sometimes consciously not to call it, so it's not
197 ;; clear that it's a bug, but even if we need to decide how 200 ;; clear that it's a bug, but even then we need to decide how
198 ;; url-http can then warn us that the download has completed. 201 ;; url-http can then warn us that the download has completed.
199 ;; In the mean time, we use this here workaround. 202 ;; In the mean time, we use this here workaround.
200 (setq retrieval-done t) 203 (setq retrieval-done t)
201 ;; We used to use `sit-for' here, but in some cases it wouldn't 204 ;; We used to use `sit-for' here, but in some cases it wouldn't
202 ;; work because apparently pending keyboard input would always 205 ;; work because apparently pending keyboard input would always